Page 241 - thinkpython
P. 241

Index                                                                       219

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