Mad Lib program example, 300–301
create_widgets() method, 330–332
tell_story() method, 333–334
Tkinter module, 330
mailing lists, Python Tutor, 5
main() function, 222–224, 420–421
mainloop() function, 306, 343, 425
Maitre D' program example, 73–74
mathematical operators, 31–32
menus, displaying, 135–136
Message Analyzer program example, 98
Message class, 342, 428–429
messages
displaying, 348–350
receiving, 264
sending, 263
methods. See also functions
abs(), 420
access methods, 250
add(), 267
all_objects(), 343, 425
capitalize(), 41
check_collide(), 365
clear(), 266, 343, 425
configure(), 310
create_score(), 418
create_widgets(), 312–313
defined, 229
defining, 232
delete(), 321
destroy(), 351
for dictionaries, 155
die(), 408–409, 417
fadeout(), 431
flip(), 278
game_over(), 371, 417
get(), 150–151, 250
dictionaries, 155
radio buttons, 329
text values, 320
get_bbox(), 426
get_bottom(), 351, 426
get_left(), 351, 368, 426
get_pos(), 351, 426
get_right(), 351, 368, 426
get_text(), 428
get_top(), 351, 426
get_value(), 290
get_velocity(), 351, 426
get_xpos(), 351, 426
get_ypos(), 351, 426
grid(), 308
column parameter, 318
columnspan parameter, 318
row parameter, 318
sticky parameter, 319
handle_collide(), 365
has_key(), 155
init(), 234–235, 294
initialization, 234
init_screen(), 425
init_sprite(), 353
init_text(), 428
invoking, 233
ispressed(), 381, 425
items(), 155
keys(), 155
for lists, 138
lower(), 40–41
mainloop(), 343
mouse_pos(), 343, 425
mouse_visible(), 343, 363, 425
moved(), 359–360, 368
move_to(), 351
next_level(), 419
objects_overlapping(), 425
overlapping_objects(), 351, 365
overriding, 275–279
play(), 390, 431
populate(), 290
private
accessing, 247–248
creating, 246–247
defined, 244
public, 244
quit(), 343, 425
replace(), 40–41
reveal(), 319
rotate_by(), 383
set(), 251
set_background(), 343, 425
set_bottom(), 351
set_left(), 351, 368
set_right(), 351
set_text(), 428
set_top(), 351
set_velocity(), 351, 360
static methods, 240
creating, 242–243
invoking, 243
status(), 242–243
stop(), 390–391, 431
strip(), 41
swapcase(), 41
tick(), 425
title(), 40–41
update_count(), 315
update_text(), 324
upper(), 39, 41
values(), 155
missiles, Astrocrash game example, 402–405
modules
color, 347, 432–436
creating, 280–281
defined, 56
importing, 283
livewires, 338–339
pygame, 338–339
random, 364
writing, 281–283
modulus (%) operator, 31
Mood Computer program example, 63–66
mouse input, 360–363
mouse_pos() method, 343, 425
mouse_visible() method, 343, 363, 425
moved() method, 359–360, 368
movement
Astrocrash game example, 399–402
sprites, 356–358
move_to() method, 351
Movie Chooser program example, 322–324
Moving Pan program example, 361–363
multiple inheritance, 269
multiplication (*) operator, 31
music. See also sound
loading, 391
looping, 392
playing, 391
stopping, 392
mutable lists, 132
mutable sequences, 104–105