Python Programming: An Introduction to Computer Science

(Nora) #1
248 INDEX

lineartime, 234
list, 184
assequence, 185
creation, 186
empty, 186
indexing, 185
merging, 239
methods,187, 203
operators, 185
removingitems, 187
slice, 187
vs.string, 185
literal, 16
float, 28
int, 28
string,41, 172
logtime, 234
longint, 35
whentouse, 36
loop, 9
accumulatorvariable, 31
ascontrolstructure, 22
counted,21, 22
definite,20, 124
end-of-file, 129
eventloop, 179
forstatement, 21
indefinite(conditional), 124
index variable, 21
infinite,125, 136
interactive, 126
loopanda half, 136
nested, 130
overa sequence, 21
post-test, 135
usingbreak, 136
usingwhile, 135
pre-test, 124
vs.recursive function, 237
whilestatement, 124
loopanda half, 136
lower, 59
Lucas,Edouard, 243


machinecode, 4
maintenance, 13
mapping, 199
mathlibrary, 29
functions,30, 31
using, 30
mathrangeerror, 30
max, 118
max-of-nprogram, 117
max-of-three,114–117


maxn.py, 117
mean, 188
median,184, 189
memory, 3
main, 3
secondary, 3
merge, 239
mergesort,239,seesorting,mergesort
mergeSort, 240
analysis, 241
messagedecoding
algorithm, 48
problemdescription, 48
program, 49
messageencoding
algorithm, 47
problemdescription, 46
program, 47
meta-language, 17
method,67, 161
parameterless, 68
accessor, 68
call(invoke),67, 167
mutator, 68
normalparameter, 167
objectparameters, 68
selfparameter, 167
methods
activate, 174
clicked, 174
deactivate, 174
dictionary, 200
list,186, 187
model-view, 217
modulefile, 7
modulehierarchychart,seestructurechart
molecularweight, 39
MonteCarlo,144, 159
monthabbreviation
problemdescription, 44
program, 45
month.py, 45
move, 68, 82
moveTower, 244
MPG, 140
MSDie, 166
mutable,185, 200
mutator, 68

nameerror, 16, 42
names, 15
nesting, 110
newlinecharacter(


n),55, 108
withreadline, 130
Free download pdf