Course Schedule

Part 1: Control Flow

Week 1

Mon: (Jan 20)
MLK Day!
No Class
Wed: Introduction (Jan 22)
  • Class Overview
  • Hardware
  • Software
  • Resources for getting help
Link to Slides
Read: Syllabus
Install: Python on Windows or Mac
Assigned: Lab-P1, P1
Fri: The Terminal (Jan 24)
  • Terminal Emulatation
  • Shells
  • Navigation
  • Program Execution
Link to Slides
Lecture: terminal commands

Week 2

Mon: Pseudocode (Jan 27)
  • Flow of Execution
  • State
Link to Worksheet
No Slides
Wed: Programming (Jan 29)
  • Syntax+Parsing
  • Values+Types
  • Calculation+Operators
  • Boolean Logic
  • Interactive vs. Script Mode, print
Link to Slides
Link to Worksheet
Read: Downey Ch 1
Due: P1
Assigned: Lab-P2, P2
Lecture: code
Fri: Vars and Exprs (Jan 31)
  • Naming Rules
  • Assignment
  • Types of errors
  • Comments
Link to Slides
Read: Downey Ch 2
Lecture: code

Week 3

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

Week 4

Mon: Conditionals 1 (Feb 10)
  • Boolean Logic
  • if,elif,else
  • Modular arithmetic
Link to Slides
Link to Worksheet
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
Lecture: code
Wed: Conditionals 2 (Feb 12)
  • Refactoring
  • Nesting
Link to Slides
Interactive Exercises
Due: P3
Assigned: Lab-P4, P4
Lecture: code
Fri: Iteration 1 (Feb 14)
  • Reassignment
  • While Loop
  • Infinite Iteration
Link to Slides
Read: Downey Ch 7
Lecture: code

Week 5

Mon: Iteration 2 (Feb 17)
  • Break
  • Continue
Link to Slides
Link to Worksheet
Interactive Exercises
Read (Optional): Sweigart Ch 2
Lecture: code
Wed: Strings (Feb 19)
  • Indexing/Slicing
  • Sequences
  • For Loop, range()
  • Searching
  • Comparison
  • String formatting
Link to Slides
Link to Worksheet
Read: Downey Ch 8
Optional: Downey Ch 9
Due: P4
Assigned: Lab-P5, P5
Lecture: code
Fri: Review Day (Feb 21)
Evening Exam 1!
Part 2: State

Week 6

Mon: Lists (Feb 24)
  • Sequence, Like a String
  • Indexing, Slicing
  • sys.argv, dir()
  • Mutable vs. Immutable
  • List Methods
Link to Slides
Read: Downey Ch 10
Lecture: code
Wed: CSV Tables (Feb 26)
  • Comparison with Spreadsheets
  • Format
  • Headers
  • Lists of lists
Link to Slides
Read: Sweigart Ch 14 (through "Reading Data from Reader Objects in a for Loop")
Due: P5
Assigned: Lab-P6, P6
Lecture: code
Fri: List Practice (Feb 28)
  • Coding Demos
No Slides

Week 7

Mon: Dictionaries 1 (Mar 2)
  • Syntax
  • Lookup
  • Insert
  • Pop
Read: Downey Ch 11 ("A Dictionary is a Mapping" through "Looping and Dictionaries")
Wed: Dictionaries 2 (Mar 4)
  • Nesting
  • dicts with lists
  • defaultdict
Read: Downey Ch 11 ("Dictionaries and Lists" and "Global Variables" to end)
Due: P6
Fri: JSON (Mar 6)
  • Deserialization
  • Serialization
  • Pretty Printing
Read: Sweigart Ch 14

Week 8

Mon: Objects (Mar 9)
  • namedtuple and recordclass
  • Mutability
  • References
  • Python Tutor
Read: Downey Ch 10 ("Objects and Values" and "Aliasing") and Ch 12
Wed: Copying (Mar 11)
  • References
  • Shallow Copy
  • Deep Copy
Read: Sweigart Ch 4 ("References" through the end)
Due: P7
Fri: Recursive Functions (Mar 13)
  • Base/Resursive Cases
  • Lists of Lists
  • More Stack Diagrams
  • Stack Overflow
Read: Downey Ch 5 ("Recursion" through "Infinite Recursion"), Ch 6 ("More Recursion" through end)

Week 9

Mon: Spring Break! (Mar 16)
No Class
Wed: Spring Break! (Mar 18)
No Class
Fri: Spring Break! (Mar 20)
No Class

Week 10

Mon: (Mar 23)
Function References
  • map
  • sort
Wed: Generator Functions (Mar 25)
  • iterators and generators
Fri: Error Handling (Mar 27)
  • Catching Exceptions
  • Throwing Exceptions
  • Asserts
Read: Sweigart Ch 10 (beginning through "Assertions")
Part 3: Data Science

Week 11

Mon: Files and Directories (Mar 30)
  • Reading
  • Writing
  • Listing children
Read: Downey Ch 14
Wed: Review Day (Apr 1)
Evening Exam 2!
Due: P8
Fri: Pandas 1 (Apr 3)
  • iPython
  • dataframe
  • series
  • reading CSVs
  • element-wise operations
Reading: Pandas Intro Notebook (HTML, .ipynb and data)

Week 12

Mon: Pandas 2 (Apr 6)
  • practice
Wed: Web 1 (Apr 8)
  • Servers/Clients
  • URLs
  • HTTP: GET and POST
  • requests module
Read: Sweigart Ch 11
Fri: Web 2 (Apr 10)
  • Intro to HTML
  • Generating HTML

Week 13

Mon: Web 3 (Apr 13)
  • Document Object Model
  • Parsing HTML
  • beautifulsoup
Wed: Database 1 (Apr 15)
  • schemas/types
  • queries
  • where
  • SQLite
  • Querying from Pandas
Due: P9
Fri: Database 2 (Apr 17)
  • aggregates
  • group by
No Slides

Week 14

Mon: Plotting 1 (Apr 20)
  • bar+scatter plots
  • plot design
  • AxesSublot
Reading: Matplotlib Intro (HTML, .ipynb and data)
Wed: Database 3 (Apr 22)
  • Worksheets
Fri: Plotting 2 (Apr 24)
  • line plots
Reading: Line and Advanced Bar Plots (HTML, .ipynb and data)

Week 15

Mon: Plotting 3 (Apr 27)
  • bar plots
Reading: same as for "Plotting 2"
Wed: Plotting 4 (Apr 29)
  • axes
  • adjacent plots
  • design decisions
Reading: Axes and Plot Design (HTML, .ipynb and data)
Fri: Randomness (May 1)
  • Debugging
  • Simulation
  • Significance