# Course Schedule

Part 1: Control Flow

### Week 1

Labor Day!
No Class
##### Wed: Introduction (Sep 4)
• Class Overview
• Hardware
• Software
• Resources for getting help
Install: Python on Windows or Mac
Assigned: Lab-P1, P1
##### Fri: The Terminal (Sep 6)
• Terminal Emulatation
• Shells
• Program Execution

### Week 2

##### Mon: Pseudocode (Sep 9)
• Flow of Execution
• State
No Slides
##### Wed: Programming (Sep 11)
• Syntax+Parsing
• Values+Types
• Calculation+Operators
• Boolean Logic
• Interactive vs. Script Mode, print
Due: P1
Assigned: Lab-P2, P2
Lecture: code
##### Fri: Vars and Exprs (Sep 13)
• Naming Rules
• Assignment
• Types of errors
Lecture: code

### Week 3

##### Mon: Using Functions (Sep 16)
• Functions
• input, str funcs, float funcs
• Arguments, Return Values
• Importing Modules
• Math Module
Read: Downey Ch 3 ("Function Calls" to "Composition")
Lecture: code
##### Wed: Creating Functions (Sep 18)
• Positional Params
• Keyword Params
• Return Values
Read: Downey Ch 3 ("Adding New Functions" to "Flow of Execution" and "Fruitful and Void Functions")
Interactive Exercises
Due: P2
Assigned: Lab-P3, P3
Lecture: code
##### Fri: Function Scope (Sep 20)
• Local vs. Global
• Argument Passing
• Frames
• Stack Diagrams
Read: Downey Ch 3 ("Parameters and Arguments" to end)
Interactive Exercises

### Week 4

##### Mon: Conditionals 1 (Sep 23)
• Boolean Logic
• if,elif,else
• Modular arithmetic
Interactive Exercises
Read: Downey Ch 5 ("Floor Division and Modulus" to "Nested Conditionals" and "Keyboard Input" to end) and Ch 6 ("Return Values" to "Boolean Functions")
Optional: Downey Ch 4
##### Wed: Conditionals 2 (Sep 25)
• Refactoring
• Nesting
Interactive Exercises
Due: P3
Assigned: Lab-P4, P4
##### Fri: Iteration 1 (Sep 27)
• Reassignment
• While Loop
• Infinite Iteration
Lecture: code
WATCH ONLINE

### Week 5

##### Mon: Iteration 2 (Sep 30)
• Break
• Continue
Interactive Exercises
Lecture: code
##### Wed: Strings (Oct 2)
• Indexing/Slicing
• Sequences
• For Loop, range()
• Searching
• Comparison
• String formatting
Optional: Downey Ch 9
Due: P4
Assigned: Lab-P5, P5
Lecture: code
Evening Exam 1!
Part 2: State

### Week 6

##### Mon: Lists (Oct 7)
• Sequence, Like a String
• Indexing, Slicing
• sys.argv, dir()
• Mutable vs. Immutable
• List Methods
Lecture: code
##### Wed: CSV Tables (Oct 9)
• Format
• Lists of lists
Due: P5
Assigned: Lab-P6, P6
Lecture: code
##### Fri: List Practice (Oct 11)
• Coding Demos
Lecture: code (w/ Wed code)
No Slides

### Week 7

##### Mon: Dictionaries 1 (Oct 14)
• Syntax
• Lookup
• Insert
• Pop
Interactive Exercises
Read: Downey Ch 11 ("A Dictionary is a Mapping" through "Looping and Dictionaries")
Lecture: code
##### Wed: Dictionaries 2 (Oct 16)
• Nesting
• dicts with lists
• defaultdict
Interactive Exercises
Read: Downey Ch 11 ("Dictionaries and Lists" and "Global Variables" to end)
Due: P6
Assigned: Lab-P7, P7
Lecture: code
##### Fri: JSON (Oct 18)
• Deserialization
• Serialization
• Pretty Printing
Lecture: code

### Week 8

##### Mon: Objects (Oct 21)
• namedtuple and recordclass
• Mutability
• References
• Python Tutor
Interactive Exercises
Read: Downey Ch 10 ("Objects and Values" and "Aliasing") and Ch 12
##### Wed: Copying (Oct 23)
• References
• Shallow Copy
• Deep Copy
Interactive Exercises
Read: Sweigart Ch 4 ("References" through the end)
Due: P7
Assigned: Lab-P8a, P8
##### Fri: Recursive Functions (Oct 25)
• Base/Resursive Cases
• Lists of Lists
• More Stack Diagrams
• Stack Overflow
Interactive Exercises
Read: Downey Ch 5 ("Recursion" through "Infinite Recursion"), Ch 6 ("More Recursion" through end) Lecture: code

### Week 9

##### Mon: Function References (Oct 28)
• map
• sort
Interactive Exercises
Lecture: code
##### Wed: Generator Functions (Oct 30)
• iterators and generators
Assigned: Lab-P8b
Lecture: code
##### Fri: Error Handling (Nov 1)
• Catching Exceptions
• Throwing Exceptions
• Asserts
Interactive Exercises
Read: Sweigart Ch 10 (beginning through "Assertions")
Lecture: code

### Week 10

##### Mon: Files and Directories (Nov 4)
• Writing
• Listing children
Read: Downey Ch 14 Lecture: code
##### Wed: Review Day (Nov 6)
Evening Exam 2!
Due: P8
Assigned: Lab-P9a, P9
##### Fri: Pandas 1 (Nov 8)
• iPython
• dataframe
• series
• element-wise operations
Reading: Pandas Intro Notebook (HTML, .ipynb and data)
Lecture: code
Part 3: Data Science

### Week 11

• practice
Lecture: code
##### Wed: Web 1 (Nov 13)
• Servers/Clients
• URLs
• HTTP: GET and POST
• requests module
Assigned: Lab-P9b Lecture: code
##### Fri: Web 2 (Nov 15)
• Intro to HTML
• Generating HTML
Lecture: code

### Week 12

##### Mon: Web 3 (Nov 18)
• Document Object Model
• Parsing HTML
• beautifulsoup
Lecture: code
##### Wed: Database 1 (Nov 20)
• schemas/types
• queries
• where
• SQLite
• Querying from Pandas
Due: P9
Assigned: Lab-P10a, P10
Lecture: code
##### Fri: Database 2 (Nov 22)
• aggregates
• group by
No Slides
Lecture: code (do lecture.ipynb in class, bus.ipynb at home)

### Week 13

##### Mon: Plotting 1 (Nov 25)
• bar+scatter plots
• plot design
• AxesSublot
Reading: Matplotlib Intro (HTML, .ipynb and data)
Lecture: code
• Worksheets
No Class

### Week 14

• line plots
Lecture: code
##### Wed: Plotting 3 (Dec 4)
• bar plots
Reading: same as for "Plotting 2"
Assigned: Lab-P10b
Lecture: code
##### Fri: Plotting 4 (Dec 6)
• axes
• design decisions
Reading: Axes and Plot Design (HTML, .ipynb and data)
Lecture: code

### Week 15

• Debugging
• Simulation
• Significance
Lecture: code
##### Wed: Review/Catchup (Dec 11)
• Bring Questions