c shelve access mode, 212
capitalize() method, 41
car value, 45–46
case-sensitivity
commands, 9
variables, 35
CHAR value, 320
characters, reading
from lines, 203–204
from text files, 202–203
check buttons, 322–326
check_collide() method, 365
class attributes, 239
accessing, 241–242
creating, 241
classes
abstract, 350
Animation, 384–387, 429
Application, 312–313
Astrocrash game example, 394
BUFFER, 403
creating GUI using, 311–314
defining, 231–232
derived, 271–274, 279
Game, 417–420
Games_Object, 350
constructor parameters, 426
methods, list of, 351, 426–427
imported, 284
Message, 342, 428–429
new-style, 249
old-style, 249
Screen, 342
attributes, 424
height, 424
methods, list of, 343, 425
Sprite, 342, 429
StringVar, 328
superclass, 277
Text, 342, 428
VELOCITY_MAX, 416
clause
else, 218
except, 214–215
clear() method, 266, 343, 425
Click Counter program example, 314–316
client functions, 243
close() function, 202, 212
closing text files, 201–202
code. See also programs
defined, 10
escape sequences, 22–23
logical errors, 42–43
quotes, with strings, 19
self-documenting, 35
string methods, 38–39
strings, Silly String programs, 26
triple-quoted strings, 21
collision detection, 363–366, 407–410
color attribute, Text class, 428
color coding, 10
color module, 347, 436
column parameter, grid() method, 318
columnspan parameter, grid() method, 318
combining objects, 264–268
commands. See also functions; methods
case-sensitivity, 9
del, 133–134
Edit menu, Run Script, 11
File menu
New Window, 11
Save As, 11
print, 9
comments
# (number sign symbol), 13
color-coded, 13
defined, 13
initial, 48
overview, 13–14
comparison operators, 59–60
compound conditions, 78
concatenating
lists, 132
strings, 27
tuples, 120
conditions
compound, 78
defined, 59
false, 72–73
tuples as, 115
values as, 73–75
configure() method, 310
console windows, 2
constants
color module, 436
creating, 106–107, 156–159
defined, 107
global, 342
key, list of, 432–436
Constructor Critter program example, 233–234
constructors
creating, 234–235
defined, 233
continue statement, 77–78
coordinate systems, graphics, 345–346
count() function, 138
Counter program example, 94–95
counting
by fives, 96–97
forward, 96
cPickle.load() function, 211
Craps Roller program example, 55
create_score() method, 418
create_widgets() method, 312–313
Critter Caretaker program example
Constructor method, 253–254
Critter class, 253
eat() method, 255
main() function, 256
menu system, creating, 256–257
mood property, 254–255
overview, 228–229
_pass_time() method, 254
play() method, 255–256
talk() method, 255
cryptography, 58