Think Python for CS114 Allen B. Downey and Cameron Morland Preface 1 The way of the program 2 Variables, expressions and statements 3 Built-in Functions 4 Adding new functions 5 Variables and parameters are local 6 Case study: interface design 7 Boolean expressions 8 Conditional execution 9 Fruitful functions 10 Incremental development 11 Reassignment 12 The while statement 13 Introducing algorithms 14 Strings 15 String traversals 16 String methods 17 Case study: word play 18 Lists 19 Traversing a list 20 List operations 21 Aliasing 22 The in operator 23 Dictionaries 24 Looping through dictionaries 25 Memoization 26 Files 27 Classes and objects 28 Classes and functions 29 Classes and methods 30 The Goodies A Debugging B Analysis of Algorithms Index