Note: this site is still up to serve as a reference for people who took the course in Spring of '19. If you're currently enrolled, please head to the site for the current semester.

Lecture Schedule

Part 1: Basic Programming

Week 1

Mon: (Jan 21)
Martin Luther King, Jr. Day!
No Class
Wed: Introduction (Jan 23)
  • Class Overview
  • Hardware
  • Software
  • Resources for getting help
Link to Slides
Watch: How to Setup Python
Read: Syllabus
Fri: The Terminal (Jan 25)
  • Terminal Emulatation
  • Shells
  • Navigation
  • Program Execution
Link to Slides

Week 2

Mon: Pseudocode (Jan 28)
  • Flow of Execution
  • State
Link to Worksheet
No Slides
Wed: Programming (Jan 30)
  • 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
Fri: Vars and Exprs (Feb 1)
  • Naming Rules
  • Assignment
  • Types of errors
  • Comments
Link to Slides
Read: Downey Ch 2

Week 3

Mon: Using Functions (Feb 4)
  • Functions
  • input, str funcs, float funcs
  • Arguments, Return Values
  • Importing Modules
  • Math Module
Link to Slides
Read: Downey Ch 3 ("Function Calls" to "Composition")
Wed: Creating Functions (Feb 6)
  • 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
Due: P2
Fri: Function Scope (Feb 8)
  • Local vs. Global
  • Argument Passing
  • Frames
  • Stack Diagrams
Read: Downey Ch 3 ("Parameters and Arguments" to end)
Link to Slides
Interactive Exercises

Week 4

Mon: Conditionals 1 (Feb 11)
  • 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
Wed: Conditionals 2 (Feb 13)
  • Refactoring
  • Nesting
Due: P3
Link to Slides
Interactive Exercises
Fri: Iteration 1 (Feb 15)
  • Reassignment
  • While Loop
  • Infinite Iteration
Link to Slides
Read: Downey Ch 7

Week 5

Mon: Iteration 2 (Feb 18)
  • Break
  • Continue
Link to Slides
Link to Worksheet
Interactive Exercises
Read (Optional): Sweigart Ch 2
Wed: Strings (Feb 20)
  • 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
Fri: Review Day (Feb 22)
Part 2: Data Structures

Week 6

Mon: Lists (Feb 25)
  • Sequence, Like a String
  • Indexing, Slicing
  • sys.argv, dir()
  • Mutable vs. Immutable
  • List Methods
Link to Slides
Read: Downey Ch 10
Evening Exam 1!
Wed: CSV Tables (Feb 27)
  • 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
Fri: List Practice (Mar 1)
  • Coding Demos
Link to Worksheet
No Slides

Week 7

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

Week 8

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

Week 9

Mon: (Mar 18)
No Class -- Spring Break!



Wed: (Mar 20)
No Class -- Spring Break!



Fri: (Mar 22)
No Class -- Spring Break!



Week 10

Mon: Advanced Functions (Mar 25)
  • iterators and generators
  • references to functions
Link to Slides
Interactive Exercises
Wed: Error Handling (Mar 27)
  • Catching Exceptions
  • Throwing Exceptions
  • Asserts
Link to Slides
Interactive Exercises
Link to Worksheet
Read: Sweigart Ch 10 (beginning through "Assertions")
Fri: Files and Directories (Mar 29)
  • Reading
  • Writing
  • Listing children
Link to Slides
Read: Downey Ch 14
Part 3: Data Science

Week 11

Mon: Review Day (Apr 1)
Evening Exam 2!
Wed: Pandas 1 (Apr 3)
  • iPython
  • dataframe
  • series
  • reading CSVs
  • element-wise operations
Due: P8
Reading: CS 301 Notes (Notebook)
Fri: Pandas 2 (Apr 5)
  • practice
Link to Worksheet

Week 12

Mon: Web 1 (Apr 8)
  • Servers/Clients
  • URLs
  • HTTP: GET and POST
  • requests module
Link to Slides
Read: Sweigart Ch 11
Wed: Web 2 (Apr 10)
  • Intro to HTML
  • Generating HTML
Link to Slides
Fri: Web 3 (Apr 12)
  • Document Object Model
  • Parsing HTML
  • beautifulsoup
Link to Slides

Week 13

Mon: Database 1 (Apr 15)
  • schemas/types
  • queries
  • where
  • SQLite
  • Querying from Pandas
Link to Slides
Wed: Database 2 (Apr 17)
  • aggregates
  • group by
Link to Slides
Movie Notebook
Bus Notebook
Bus Answers Notebook
Due: P9

Week 14

Mon: Plotting 1 (Apr 22)
  • pie charts
  • scatter plots
  • plot design
  • AxesSublot
Reading: CS 301 Notes (Notebook)
Wed: Plotting 2n (Apr 24)
  • line plots
Reading: CS 301 Notes (Notebook)
Fri: Plotting 3 (Apr 26)
  • bar plots
Reading: same as for "Plotting 2"

Week 15

Mon: Plotting 4 (Apr 29)
  • axes
  • adjacent plots
  • design decisions
Reading: CS 301 Notes (Notebook)
Wed: Randomness (May 1)
  • Debugging
  • Simulation
  • Significance
Link to Slides
Fri: Review/Catchup (May 3)
  • Bring Questions
Link to Worksheet
Due: P10