Index_T


T

tab character (t), 23, 25

text, displaying, 346–348

text attribute, Text class, 428

text-based widgets, 316–321

Text class, 342, 428

text files

access modes, 202

looping through, 205

opening and closing, 201–202

plain text files, 198

Read It program example, 199–201

reading characters from, 202–203

writing to, 205–208

Three-Year-Old Simulator program example, 67–68

Tic-Tac-Toe game example

ask_number() function, 187

ask_yes_no() function, 187

computer_move() function, 191–193

congrat_winner() function, 194

data representation, 184

display_board() function, 188

display_instruct() function, 186–187

functions, creating list of, 184

human_move() function, 190–191

legal_moves() function, 189

main() function, 194

new_board() function, 188

next_turn() function, 194

overview, 164

pieces() function, 187–188

program setup, 186

pseudocode, writing, 183

winner() function, 189–190

tick() method, 425

title() method, 40–41

Tkinter toolkit, 302

total attribute, 239

tracing programs, 71–72

transparent value, 354–355

Trivia Challenge game example

answers, checking and retrieving, 223–224

data file layout, 219–220

game ending, 224

game setup, 222–223

next_block() function, 221–222

next_line() function, 221

open_file() function, 220–221

overview, 198

questions, asking, 223

true values, 74, 76–77

try statement, 214–215

tuples

concatenating, 120

as conditions, 115

defined, 113

with elements, 115

empty, 114

immutable, 120

indexing, 118–119

len() function with, 118

nested, 143–144

in operator with, 118

printing, 115–116

slicing, 119

when to use, 139

TypeError exception type, 215




Python Programming for the Absolute Beginner
Python Programming for the Absolute Beginner, 3rd Edition
ISBN: 1435455002
EAN: 2147483647
Year: 2003
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net