1. Intro What is Python? Dynamic languages Why Python? Easy Very High Level "A programming language is low level when its programs require attention to the irrelevant." Powerful Large Library Portable Free Console Interaction IDE (PythonWin? IDLE?) help() Basic Syntax Statements Variables Naming Assignment Typing Basic casting Calling Functions Basic I/O Example: Hello World Echo Exercise: Input some info, do some math, output result 2. Syntax Indentation Breaking commands across lines Strings Raw Unicode Basic Lists Operators Mathematical Logical Formatting If/Elif/Else Values as conditions Loops While ~For Break/Continue Modules/Libraries Calling methods Example: Ask for 5 marks, display average + comment Guess number Exercise: Input N numbers, output sum/avg/min/max Guess number + higher/lower + try counter + multiple rounds 3. Data Types Numbers Integers Floats Booleans Strings Functions Lists Functions Slicing Mapping/Comprehension Limitations Tuples Multi-variable assignments Sets Dictionaries Functions Keys (Immutable) For loops Example: Marks list, add, remove, get average Exercise: Word counter Dictionary program with menu, add/remove/lookup/list 4. Functions + Scope Defining Functions Parameters Positional and keyword arguments Default parameters Returning Multi-variable returns Variable-length argument lists Docstrings Assignment of functions Functions are objects Lambda Functions Scope Local and global scope Nested scope Variable creation Globals Globals in functions Overriding globals JIT identifier lookup Deleting variables Deleting from inside functions Modules Random Example: Dictionary composer with variable arguments Recursive list flattener Exercise: Palindromes Flexible list sorter (+ flattener) 5. Files + Exceptions Files Input Output Iteration over lines Exceptions Intro Catching Finally Returning problem Throwing Passing up Non-error usage Defining Attributes Example: Text file filter Exercise: INI reader/writer/editor + error handling 6. Objects I Intro to OOP Syntax Instance Methods Calling methods from inside class Calling methods from outside class Constructor Data Members Instance Class Static Methods Class Methods Private Members Inheritance Calling Base Methods Example: Critters Exercise: Shapes juggler 7. Objects II + Reflection + Practice Polymorphism Overloading Operators Length Representation Reflection Example: Matrix Exercise: Fraction 8. Standard Library Examples Basic Functions any() / all() os system() startfile() File system management Folders listdir() mkdir() rmdir() Files remove() rename() sys argv modules stdout/stderr version_info platform maxint time time() mktime() sleep() strftime() strptime() clock()