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

Course Schedule

Part 1: Control Flow

Week 1

Mon: No class (Sep 06)
  • Labor day
Wed: Introduction (Sep 08)
  • Class Overview
  • Hardware
  • Software
  • Resources for getting help
Read: Syllabus
Link to Slides
Python3 (Anaconda3) installation: Windows, MAC
Assigned: Lab-P1, P1
Fri: The Terminal (Sep 10)
  • Terminal Emulatation
  • Shells
  • Navigation
  • Program Execution
Link to Slides
Terminal commands notes
Demo: Windows, MAC

Week 2

Mon: Pseudocode (Sep 13)
  • Flow of Execution
  • State
Link to worksheet: pdf, docx
Link to worksheet solutions: Andy, Meena
No slides
Wed: Operators (Sep 15)
  • Syntax + Parsing
  • Values + Types
  • Calculation + Operators
  • Boolean Logic
  • Interactive vs. Script Mode, print
Read: Downey Ch 1
Due: P1
Link to Slides
Link to worksheet: pdf, docx
Link to worksheet solutions: Andy, Meena
Meena's Lecture: code
Andy's Lecture: code
Assigned: Lab-P2, P2
Fri: Vars and Exprs (Sep 17)
  • Naming Rules
  • Assignment
  • Types of errors
  • Comments
Read: Downey Ch 2
Due: Quiz1
Link to Slides
Meena's Lecture: code
Andy's Lecture: code

Week 3

Mon: Using Functions (Sep 20)
  • Functions
  • input, str funcs, float funcs
  • Arguments, Return Values
  • Importing Modules
  • Math Module
Read: Downey Ch 3 ("Function Calls" to "Composition")
Link to Slides
Meena's Lecture: code
Andy's Lecture: code
Wed: Creating Functions (Sep 22)
  • 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
Due: P2
Link to Slides
Link to worksheet: pdf, docx
Interactive Exercises
Meena's Lecture: code
Andy's Lecture: code
Assigned: Lab-P3, P3
Fri: Function Scope (Sep 24)
  • Local vs. Global
  • Argument Passing
  • Frames
  • Stack Diagrams
Read: Downey Ch 3 ("Parameters and Arguments" to end)
Due: Quiz2
Link to Slides
Interactive Exercises
Meena's Lecture: code

Week 4

Mon: Conditionals 1 (Sep 27)
  • Boolean Logic
  • if,elif,else
  • Modular arithmetic
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
Link to Slides
Link to worksheet: pdf, docx
Interactive Exercises
Meena's Lecture: code
Andy's Lecture: code
Wed: Conditionals 2 (Sep 29)
  • Refactoring
  • Nesting
Due: P3
Link to Slides
Interactive Exercises
Meena's Lecture: code
Andy's Lecture: code
Assigned: Lab-P4, P4
Fri: Iteration 1 (Oct 01)
  • While Loop
  • Loop Control Variable
  • Infinite Iteration
Read: Downey Ch 7
Due: Quiz3
Link to Slides
Meena's Lecture: code
Andy's Lecture: code
Code review walkthrough: YouTube

Week 5

Mon: Iteration 2 (Oct 04)
  • Nested Loops
  • Break
  • Continue
Read (Optional): Sweigart Ch 2
Link to Slides
Link to worksheet: pdf, docx
Interactive Exercises
Meena's Lecture: code
Andy's Lecture: code
Wed: Strings (Oct 06)
  • Comparison
  • String methods
  • Strings are Sequences
  • Indexing & Slicing
  • For Loop, range()
Read: Downey Ch 8
Optional: Downey Ch 9
Due: P4
Link to Slides
Link to worksheet: pdf, docx
Meena's Lecture: code
Andy's Lecture: code
Assigned: Lab-P5, P5
Fri: Exam 1 review day (Oct 08)
  • Evening exam
Due: Quiz4 due by 2:29pm!
Part 2: State

Week 6

Mon: Lists (Oct 11)
  • Lists are Sequences
  • Indexing & Slicing
  • Lists are Mutable
  • List Methods
Read: Downey Ch 10
Link to Slides
Meena's Lecture: code
Andy's Lecture: code
Wed: CSV Files (Oct 13)
  • Comparison to Spreadsheets
  • Format
  • Headers
  • Lists of lists
Read: Sweigart Ch 16 (through "Reading Data from Reader Objects in a for Loop")
Due: P5
Link to Slides
Meena's Lecture: code
Andy's Lecture: code
Assigned: Lab-P6, P6
Fri: List Practice (Oct 15)
  • Coding Demos
Due: Quiz5
No slides
Link to worksheet: pdf, docx
Interactive Exercises
Meena's Lecture: code
Andy's Lecture: code

Week 7

Mon: Dictionaries 1 (Oct 18)
  • Syntax
  • Lookup
  • Insert
  • Pop
Read: Downey Ch 11 ("A Dictionary is a Mapping" through "Looping and Dictionaries")
Link to Slides
Interactive Exercises
Meena's Lecture: code
Andy's Lecture: code
Wed: Dictionaries 2 (Oct 20)
  • Nesting
  • dict of lists
  • list of dicts
  • dict of dicts
Read: Downey Ch 11 ("Dictionaries and Lists" and "Global Variables" to end)
Link to Slides
Interactive Exercises
Meena's Lecture: code
Andy's Lecture: code
Assigned: Lab-P7, P7
Fri: JSON (Oct 22)
  • Deserialization
  • Serialization
  • Python/JSON dfferences
Read: Sweigart Ch 16
Due: Quiz6
Due: P6
Link to Slides
Link to worksheet: pdf, docx, problem 3 solution video
Meena's Lecture: code
Andy's Lecture: code

Week 8

Mon: Objects (Oct 25)
  • namedtuple and recordclass
  • Mutability
  • References
  • Python Tutor
Read: Downey Ch 10 ("Objects and Values" and "Aliasing") and Ch 12
Link to Slides
Interactive Exercises
Meena's Lecture: code
Andy's Lecture: code
Wed: Copying (Oct 27)
  • References
  • Shallow Copy
  • Deep Copy
Read: Sweigart Ch 4 ("References" through the end)
Due: P7
Link to Slides
Link to worksheet: pdf, docx
Interactive Exercises
Assigned: Lab-P8, P8
Andy's Lecture: code
Fri: Recursive Functions (Oct 29)
  • Base/Recursive Cases
  • Lists of Lists
  • More Stack Diagrams
  • Stack Overflow
Read: Downey Ch 5 ("Recursion" through "Infinite Recursion"), Ch 6 ("More Recursion" through end)
Due: Quiz7
Link to Slides
Interactive Exercises
Meena's Lecture: code
Andy's Lecture: code

Week 9

Mon: Function References (Nov 01)
  • functions as objects
  • sort
  • lambda
Link to Slides
Meena's Lecture: code
Andy's Lecture: code
Wed: Iterators and comprehensions (Nov 03)
  • review: recursive function
  • review: function object examples
  • iterators
  • list / dict comprehensions
  • tuple unpacking
Read: Downey Ch 19.2, 12.3
Due: P8
Link to Slides
Link to worksheet: pdf, docx
Link to worksheet answers: pdf
Meena's Lecture: code
Andy's Lecture: code
Meena's Kaltura videos: LEC001, LEC002
Assigned: Lab-P9, P9
Fri: Error Handling (Nov 05)
  • Assert Statements
  • Catching Exceptions
  • Throwing Exceptions
Read: Sweigart Ch 11 (beginning through "Assertions")
Due: Quiz8
Link to Slides
Interactive Exercises
Link to worksheet: pdf, docx
Meena's Lecture: code
Andy's Lecture: code

Week 10

Mon: Files and Directories (Nov 08)
  • Reading
  • Writing
  • os module
Read: Downey Ch 14
Link to Slides
Meena's Lecture: code
Andy's Lecture: code
Wed: Exam 2 review day (Nov 10)
  • Evening exam
Due: P9 --- Now changed to Thursday Nov 11
Assigned: Lab-P10, P10
Fri: Pandas 1 (DS topic) (Nov 12)
  • Series
  • element-wise operations
  • mean, median, mode, quantiles
Required Reading: Pandas Intro Notebook (HTML or pandas-intro.ipynb)
Quiz9: converted to practice quiz
No slides
Link to worksheet (notebook): code
Meena's Lecture: code
Andy's Lecture: code
Part 3: Data Science

Week 11

Mon: Pandas 2 (Nov 15)
  • DataFrame
  • reading CSVs
No slides
Link to worksheet: pdf, docx
Meena's Lecture: code
Andy's Lecture: code
Wed: Web 1 (Nov 17)
  • Servers/Clients
  • URLs
  • HTTP: GET and POST
  • requests module
Read: Sweigart Ch 12
Due: P10
Due: CS319 Project part 1: proposal (Not applicable to CS220 students)
Link to Slides
Meena's Lecture: code
Andy's Lecture: code
Assigned: Lab-P11, P11
Fri: Web 2 (Nov 19)
  • Intro to HTML
  • Generating HTML
Due: Quiz10
Link to Slides
Meena's Lecture: code
Andy's Lecture: code

Week 12

Mon: Web 3 (Nov 22)
  • Document Object Model
  • Parsing HTML
  • beautifulsoup
Link to Slides
Meena's Lecture: code
Andy's Lecture: code
Wed: Database 1 (Nov 24)
  • schemas/types
  • queries
  • where
  • SQLite
  • Querying from Pandas
Due: P11
Due: CS319 Project part 2: data set (Not applicable to CS220 students)
Link to Slides
Meena's Lecture: code
Andy's Lecture: code
Assigned: Lab-P12, P12
Fri: No class (Nov 26)
  • Thanksgiving!

Week 13

Mon: Database 2 (Nov 29)
  • aggregates
  • group by
No slides
Link to worksheet (notebook): ipynb
Meena's Lecture: code
Andy's Lecture: code
Wed: Database 3 (Dec 01)
  • Worksheets
  • Pandas <--> SQL
No slides
Link to worksheet: pdf, docx
Link to worksheet solution (partial): pdf
Meena's Lecture: code
Andy's Lecture: code
Fri: Plotting 1 (Dec 03)
  • bar+scatter plots
  • plot design
  • AxesSublot
Read: Matplotlib Intro (HTML or matplotlib-intro.ipynb and data)
Due: Quiz11
Meena's Lecture: code
Andy's Lecture: code

Week 14

Mon: Plotting 2 (Dec 06)
  • scatter plots
  • line plots
Read: Line and Advanced Bar Plots (HTML, line-and-bar.ipynb and data)
Meena's Lecture: code
Andy's Lecture: code
Assigned: Lab-P13, P13
Wed: Plotting 3 (Dec 08)
  • simulations
  • bar plots with 'other'
Read: same as for "Plotting 2"
Due: P12
Due: CS319 Project part 3: initial code (Not applicable to CS220 students)
Meena's Lecture: code
Andy's Lecture: code
Fri: Plotting 4 (Dec 10)
  • axes limits
  • logarithmic axes
  • adjacent plots
  • design decisions
Read: Axes and Plot Design (HTML, axes.ipynb and data)
Due: Quiz12
Meena's Lecture: code
Andy's Lecture: code

Week 15

Mon: Randomness (Dec 13)
  • Debugging
  • Simulation
  • Significance
Link to Slides
Meena's Lecture: code
Andy's Lecture: code
Wed: Review/Catchup (Dec 15)
  • Bring Questions
Due: P13
Due: No work accepted after today. No late days or extensions may be used.
Due: CS319 Project part 4: final code (Not applicable to CS220 students)