Python Programming: An Introduction to Computer Science

(Nora) #1
244 INDEX

conditionalloop, 124
constructor, 67, 161
init , 168
parametersin, 67
controlcodes, 46
controlstructure, 103
decision, 103
definitionof, 22
loop, 22
nestedloops, 130
nesting, 110
controlstructures
Booleanoperators, 138
forstatement, 22
if, 105
if-elif-else, 111
if-else, 108
while, 124
convert.py, 14, 103
convert2.py, 104
convertgui.pyw, 79
coordinates
asinstancevariables, 67
changingwithsetCoords, 75
ina GraphWin, 65
ofa Point, 65
setCoordsexample, 76
transforming, 75
countedloop
definitionof, 21
inPython, 22
CPU(CentralProcessingUnit), 3
craps, 159
createLabeledWindow, 98
cryptography, 50
cylinder, 180


data,27, 161
datatype
automaticconversion, 36
definitionof, 28
explicitconversion, 36
informatspecifiers, 53
mixed-typeexpressions, 36
stringconversion, 52
stringconversions, 49
datatypes
file, 55
float, 28
int, 28
longint, 35
string, 41
date, 120
daynumber, 120


debugging, 13
decision, 103
implementationviaBooleanoperator, 138
multi-way, 110
nested, 110
simple(one-way), 105
two-way, 108
decisiontree, 115
decoding, 48
algorithm, 48
program, 49
definiteloop, 124
definitionof, 20
useascountedloop, 22
degree-days, 140
delete, 187
DeMorgan’s laws, 134
design,13, 207
objectoriented,seeobjectorienteddesign
top-down, 146
stepsin, 154
designpattern
importanceof, 124
designpatterns
countedloop,21, 123
end-of-fileloop, 129
interactive loop, 126
IPO, 14
loopaccumulator, 31, 123
model-view, 217
nestedloops,130, 131
sentinelloop, 127
loopanda half, 136
designtechniques
divideandconquer, 235
spiraldevelopment, 156
whentouse, 158
dice, 159
dicepoker
classes
Dice, 217
GraphicsInterface, 225
PokerApp, 219
TextInterface, 221
problemdescription, 216
diceroller
problemdescription, 173
program, 178
dictionary, 199
creation, 200
empty, 200
methods, 200
DieView, 191
classdefinition,176, 193
Free download pdf