Page 241 - think python 2
P. 241
Index
219
poker, 171, 181
polygon function, 31
polymorphism, 168, 169
pop method, 94, 175
popen function, 142
portability, 6
positional argument, 164, 169, 190 postcondition, 36, 59, 179
pprint module, 112
precedence, 199
precondition, 36, 37, 59, 179
prefix, 131
pretty print, 112
print function, 3
print statement, 3, 7, 165, 197 problem solving, 1, 6
profile module, 133
program, 1, 6
program testing, 87 programmer-defined function, 22, 129
random text, 131
random walk programming, 134, 200 rank, 171
read method, 143
readline method, 83, 143 reassignment, 63, 68, 90, 110 Rectangle class, 149
recursion, 43, 47, 55, 57
base case, 44
infinite, 44, 58, 196
recursive definition, 56, 124
red-black tree, 206
reduce pattern, 93, 100
reducible word, 113, 124
reduction to a previously solved problem,
85
reduction to a previously solved problem,
87 redundancy, 5
refactoring, 34–36, 180 reference, 96, 97, 100
aliasing, 96 rehashing, 208
relational operator, 40, 173 relative path, 139, 145 reload function, 144, 195 remove method, 94 repetition, 30
list, 91
replace method, 125
repr function, 144 representation, 147, 149, 171 return statement, 44, 51, 199 return value, 17, 26, 51, 150
tuple, 117
reverse lookup, 112
reverse lookup, dictionary, 106 reverse word pair, 101 reversed function, 121 rotation
letters, 113 rotation, letter, 80
rubber duck debugging, 134 running pace, 8, 15, 160
running Python, 2
runtime error, 14, 44, 46, 193, 196 RuntimeError, 45, 58
safe language, 14 sanity check, 111
programmer-defined type, 162, 165, 173
147, 153,
155,
Project Gutenberg, 125
prompt, 2, 6, 45
prose, 5
prototype and patch, 156, 158, 160 pseudorandom, 126, 134
pure function, 156, 160 Puzzler, 88, 113, 124 Pythagorean theorem, 52 Python
running, 2
Python 2, 2, 3, 33, 40, 45 Python in a browser, 2 PythonAnywhere, 2
quadratic, 209
quadratic growth, 203 quotation mark, 3, 4, 35, 74, 194
radd method, 167 radian, 18
radix sort, 201 rage, 200
raise statement, 107, 112, 159 Ramanujan, Srinivasa, 70 randint function, 101, 126 random function, 126 random module, 101, 126, 175 random number, 126