Chapter 1: programs 1.1 python, interactive mode 1.2 programs (input, output, etc) 1.3 debugging 1.4 formal and natural languages 1.5 first program; print() 1.6 debugging Chapter 2: variables, expressions, etc 2.1 values and types: int,str,float 2.2 variables, assignment 2.3 variable names 2.4 operators: +,-,*,/,** 2.5 expressions and statements 2.6 interactive vs script mode 2.7 order of operations 2.8 string operations: +, * 2.9 comments 2.10 debugging (basics) Chapter 3: basic functions 3.1 functions calls: args, return values 3.2 type conversion 3.3 import, math functions 3.4 composition 3.5 write your own functions 3.6 definitions 3.7 flow of execution 3.8 parameters and arguments 3.9 variables and parameters are local 3.10 stack diagrams 3.11 fruitful functions and void functions 3.12 why functions? 3.13 importing with from 3.14 debugging (spaces and tabs, print statements) Chapter 4: turtle graphics example 4.1 turtle world 4.2 simple repetition/for loops 4.3 turtle exercises to try 4.4 encapsulation: def square(t) 4.5 generalization: def square(t, sidelength) 4.6 interface design (clean use of parameters) 4.7 refactoring 4.8 development plan (start small, refactor, etc) 4.9 docstring ("""function comments""") 4.10 debugging (pre & postconditions) Chapter 5: Conditionals and recursion 5.1 % operator 5.2 boolean expressions 5.3 and, or, not 5.4 if 5.5 if/else 5.6 if/elif/else 5.7 nested conditionals 5.8 recursion??? 5.9 stack diagrams with recursive functions 5.10 infinite recursion 5.11 keyboard input: raw_input() 5.12 debugging (traceback) Chapter 6: Fruitful functions 6.1 return values 6.2 incremental development (TDD) 6.3 composition: call one function from another 6.4 boolean functions 6.5 more recursion 6.6 leap of faith 6.7 another recursion example 6.8 checking types: isinstance(x, int), defensive programming 6.9 debugging (args, function, return, print statements) Chapter 7: Iteration 7.1 multiple assignment (b = a) 7.2 updating variables: x = x + 1 7.3 while loops 7.4 while True + break 7.5 square root (example of while loop) 7.6 algorithms (humans vs computers, designing alg's) 7.7 debugging (bisection) Chapter 8: strings 8.1 sequence 8.2 len() 8.3 for loop over chars 8.4 slicing 8.5 immutable 8.6 searching a string 8.7 looping and counting (accumulator) 8.8 string methods 8.9 in operator 8.10 string comparison 8.11 debugging (getting indices correct) Chapter 9: word play example 9.1 file I/O (readlines()) 9.2 examples of file I/O 9.3 search 9.4 looping with indices 9.5 debugging (testing special cases) Chapter 10: lists 10.1 sequence 10.2 mutable 10.3 traverse a list 10.4 list operations: +, * 10.5 slicing 10.6 methods 10.7 map, filter, reduce 10.8 deleting elements 10.9 lists and strings (list(), split(), join() 10.10 objects and values (a = [1,2,3]; b = [1,2,3]) 10.11 aliasing 10.12 passing lists to functions 10.13 debugging (common list problems, like L = L.sort()) Chapter 11: dictionaries Chapter 12: tuples Chapter 13: example...data structure selection 13.1 word-freq analysis (read file, parse into words) 13.2 random numbers (random(), randint(), choice()) 13.3 word histogram (uses dictionary!!) 13.4 most-common words (same) 13.5 optional params 13.6 dictionary subtraction?? 13.7 random words (choice) 13.8 markov analysis 13.9 data structures (analysis) 13.10 debugging (how to, think!) Chapter 14: files 14.1 persistence 14.2 reading and writing 14.3 format operator (print formatting) 14.4 filenames and paths 14.5 try/except 14.6 database 14.7 pickling 14.8 pipes 14.9 writing modules (import your own code) 14.10 debugging (whitespace, \n problems) Chapter 15: classes and objects 15.1 user-defined types 15.2 attributes 15.3 rectangle example 15.4 instances and return values 15.5 mutable 15.6 copying an object (copy.copy(p1)) 15.7 debugging (hasattr()) Chapter 16: classes and functions 16.1 Time class example 16.2 pure functions (doesn't modify args, only returns value) 16.3 modifiers 16.4 prototype & patch vs TDD 16.5 Debugging (invariants, assert) Chapter 17: classes and methods 17.1 OO features 17.2 printing 17.3 example 17.4 another example 17.5 __init__ 17.6 __str__ 17.7 operator overloading (__add__) 17.8 type-based dispatch 17.9 polymorphism 17.10 debugging 17.11 interface/information hiding Chapter 18: inheritance 18.1 card objects 18.2 class attributes 18.3 comparing cards 18.4 Deck object 18.5 __str__ for Deck 18.6 add, remove, shuffle, sort 18.7 inheritance (Hand class?) 18.8 class diagrams 18.9 Debugging 18.10 Data encapsulation Chapter 19: Tkinter Appendix A: Debugging A.1 syntax errors A.2 runtime errors A.3 semantic errors Appendix B: Analysis of Algorithms B.1 order of growth B.2 analysis of basic python ops B.3 analysis of search alg's B.4 hashtables