Philadelphia Python Workshop 9/Lecture

Welcome to the Lecture section of the Philadelphia Python Workshop! For about an hour, we'll review some basic Python concepts.

Resources

 * Python data types cheat sheet.
 * Python loops cheat sheet.


 * state_capitals.py -- the state capitals example.
 * CodingBat 2.
 * CodingBat 3.

For extra practice, see Python's official tutorial.

Lecture outline

 * 1) review the basics
 * 2) * math
 * 3) * type
 * 4) * variables
 * 5) * strings
 * 6) * booleans
 * 7) * if/elif/else
 * 8) * functions
 * 9) lists
 * 10) * purpose
 * 11) * initialization
 * 12) * len review
 * 13) * accessing elements
 * 14) * adding elements
 * 15) * changing elements
 * 16) * slicing lists
 * 17) * strings are like lists
 * 18) loops and more flow control
 * 19) * for loops
 * 20) * if statements inside for loops
 * 21) * nested for</tt> loops
 * 22) * range</tt>
 * 23) * while</tt> loops
 * 24) * infinite loops
 * 25) * if</tt> statements inside while</tt> loops
 * 26) * break</tt>
 * 27) * raw_input</tt>
 * 28) dictionaries
 * 29) * purpose
 * 30) * initialization
 * 31) * accessing elements
 * 32) * adding elements
 * 33) * changing elements
 * 34) * keys</tt> and values</tt>
 * 35) modules
 * 36) * purpose
 * 37) * builtins
 * 38) * imports
 * 39) * import random</tt>
 * 40) * random.randint</tt>
 * 41) * random.choice</tt>
 * 42) * walk through state_capitals.py

Where state_capitals.py from http://mit.edu/jesstess/www/BostonPythonWorkshop6/state_capitals.py is the grand finale and synthesis of lecture material.