INDEX 249
Newton’s method, 40
None, 97
numbers2text.py, 49
numerology, 61
object, 161
aliasing, 69
applicationas, 194
asblackbox, 207
asparameter, 68
attributes, 161
definitionof, 63
state, 68
objectorienteddesign(OOD), 207
object-oriented, 63
objects
built-in
file, 59
None, 97
string, 59
graphics,seegraphicslibrary, objects
other,seeclasses
objrball.py, 213
OldMacDonald, 100
one-waydecision, 105
open, 56
operator
Boolean, 132
ascontrolstructure, 138
definitionof, 16
precedence,16, 132
relational, 105
short-circuit, 138
operators
Boolean, 132
del, 187
list, 185
mathematical, 16
Pythonnumericoperators, 28
relational, 105
stringformatting, 53
or, 132
operationaldefinition, 138
ord, 46
outputlabeling, 17
outputstatements, 16
Oval, 83
overflow error, 33
override, 230
overtime, 120
parameter, 6
actual, 93
asfunctioninput, 95
formal, 93
functionsasparameters, 203
matchingbyorder, 95
multiple, 94
objectsas, 68
removingcodeduplication, 90
scopeissues,92, 93
self, 167
pi
mathlibrary, 31
MonteCarloapproximation, 159
seriesapproximation, 39
pixel, 65
pizza, 38
plaintext, 50
Player, 213
playingcard, 181
plot, 81
plotPixel, 81
Point,65, 82
poker,seedicepoker
Polygon,79, 83
polymorphism, 228
portability, 5
post-testloop, 135
precision, 53
primenumber, 140, 206
primingread, 127
printstatement,6, 17
semantics, 17
syntax, 17
printfile.py, 57
prism, 180
privateattributes, 178
privatekey encryption, 51
program, 1
programming
definitionof, 2
environment, 7
event-driven, 77
whylearn, 2
programminglanguage,4–5
andportability, 5
vs.naturallanguage, 4
examples, 4
high-level, 4
syntax, 17
translation, 4
programs, 35
averagen numbers,123,126–130
averagetwo numbers, 20
calculator, 197
cannonballsimulation,164,169, 172
changecounter, 27, 54