12.07.2015 Views

Think Python - Denison University

Think Python - Denison University

Think Python - Denison University

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Index 207raw input, 45recursive, 43reload, 142, 196repr,142reversed, 122shuffle, 174sorted, 122sqrt,18, 53str,18sum, 118tuple, 115type, 150zip, 118function argument, 21function call, 17, 26function composition, 54function definition, 19, 20, 25function frame, 23, 26, 43, 109function object, 20, 26function parameter, 21function syntax, 160function typemodifier, 155pure, 154function, fruitful,24function, math, 18function, reasons for,25function, trigonometric, 18function, tuple asreturn value, 117function, void, 24functional programming style, 155, 158gamma function, 58gather, 117, 123GCD (greatestcommon divisor),61generalization, 32, 36, 83, 157geometry manager, 188, 192get method, 105getattr function, 166getcwd function, 137global statement, 110global variable, 110, 113update, 110GNU Free Documentation License, v, vigraphical user interface, 181greatest common divisor (GCD),61grid, 27guardian pattern, 59, 60, 77GUI, 181, 191Gui module, 181gunzip (Unix command), 141Hand class,174hanging, 197HAS-A relationship, 176, 178hasattr function, 150, 166hash function, 108, 113hashable, 108, 113, 120hashtable, 104, 113header, 19, 25, 196Hello, World, 6help utility,8hexadecimal, 146high-level language, 1, 7histogram, 105, 113random choice, 126, 129word frequencies, 127Holmes, Sherlock, 4homophone, 114HTMLParser module, 193hyperlink, 193hypotenuse, 54identical, 100identity, 96if statement, 40Image module, 192image viewer, 192IMDb (Internet Movie Database), 144immutability, 74, 79, 97, 108, 115, 122implementation, 105, 113, 132import statement, 26, 29, 142inoperator, 76, 90, 104increment, 64, 68, 155, 161incremental development, 60, 195indentation, 19, 160, 196index, 71, 77, 79, 89, 99, 103, 198looping with, 84, 91negative, 72slice, 73, 92startingat zero, 71, 90IndexError, 72, 78, 90, 199infinite loop, 65, 69, 181, 197infinite recursion, 44, 47, 58, 197, 198inheritance, 174, 177init method, 162, 166, 170, 172, 174initializationvariable, 68initialization (beforeupdate), 64instance, 29, 36, 146, 151

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!