Course Schedule

Part 1: Control Flow

Week 1

Mon: (Sep 02)
No class
Wed: (Sep 04)
Introduction
  • Class overview
  • Resources for getting help
Read: Syllabus
Assigned: Student Information Survey
Python installation: Instructions
Assigned: P1
Louis's Lecture: Slides
Mike's Lecture: Slides
Fri: (Sep 06)
Pseudocode
  • Flow of execution
  • State
Read: Python for Everybody, Ch. 1
Link to worksheet: pdf, docx
Link to worksheet solutions: pdf
Louis's Lecture: Worksheet
Mike's Lecture: Worksheet

Week 2

Mon: (Sep 09)
Operators
  • Values and types
  • Escape Characters
  • Operators and Expressions
  • Mathematical operators: +, -, *, /, //, **
  • String operators: +, *
  • Comparison operators: <=, >=, ==, !=, <, >
  • Boolean operators: and, or, not
  • Order of Operations
  • Comments
  • JupyterLab features: save, table of contents
Read: Downey Ch 1
Read: Python for Everybody, Ch. 2
Additional Reading: Computer terminology
Link to worksheet: pdf, docx
Link to worksheet solutions: pdf
Louis's Lecture: code
Mike's Lecture: code
Wed: (Sep 11)
Variables
  • Identify parts of expressions: operators, literal values, variables
  • Naming rules for variables
  • Assignment statements
  • Types of errors (Syntax, Runtime, Semantic)
  • JupyterLab features: shortcuts, debugger, ways of running Python
Read: Downey Ch 2 and Appendix A
Read: Python for Everybody, Ch. 3
Louis's Lecture: code
Mike's Lecture: code
Due: P1
Assigned:
Fri: (Sep 13)
Using Functions
  • Functions
  • Arguments, return values
  • input, print, type cast functions: int, float, str, bool
  • Importing modules
  • math and random Modules
  • Jupyterlab features: cell types (Code, Markdown, Raw) and cell properties (editable vs. read-only)
Read: Downey Ch 3 ("Function Calls" to "Composition")
Read: Python for Everybody, 5.1 - 5.4
Due: Student Information Survey
Due: Quiz 1 (11:59:00 pm)
Louis's Lecture: code
Mike's Lecture: code

Week 3

Mon: (Sep 16)
Creating Functions
  • Blocks
  • Positional arguments
  • Keyword arguments
  • default arguments
  • return
Read: Downey Ch 3 ("Adding New Functions" to "Flow of Execution" and "Fruitful and Void Functions")
Read: Python for Everybody, 5.5 - 5.10
Read: Creating Fruitful Functions
Interactive Exercises
Link to worksheet: pdf, docx
Link to worksheet solutions: pdf
Louis's Lecture: code
Mike's Lecture: code
Wed: (Sep 18)
Function Scope
  • Local vs. global
  • Argument passing
  • Frames
  • Stack diagrams
Read: Downey Ch 3 ("Parameters and Arguments" to end)
Read: Python for Everybody, 5.11 - 5.16
Interactive Exercises
Louis's Lecture: code
Mike's Lecture: code
Due: P2
Assigned:
Fri: (Sep 20)
Conditionals 1
  • Boolean logic
  • if, elif, else
  • Blocks of code
Read: Downey Ch 5 ("Floor Division and Modulus" to "Nested Conditionals" and "Keyboard Input" to end) and Ch 6 ("Return Values" to "Boolean Functions")
Read: Python for Everybody, 4.1 - 4.5
Optional: Downey Ch 4
Interactive Exercises
Link to worksheet: pdf, docx
Link to worksheet solutions: pdf
Louis's Lecture: code
Mike's Lecture: code
Due: Quiz 2 (11:59:00 pm)

Week 4

Mon: (Sep 23)
Conditionals 2
  • Nesting
  • Refactoring
Read: Python for Everybody, 4.6 - end (skip 4.7)
Interactive Exercises
Link to slides
Louis's Lecture: code
Mike's Lecture: code
Wed: (Sep 25)
Iteration 1
  • While Loop
  • Loop Control Variable
  • Infinite Iteration
Read: Downey Ch 7
Read: Python for Everybody, 6.1 - 6.3
Link to slides
Louis's Lecture: code
Mike's Lecture: code
Due: P3
Assigned:
Fri: (Sep 27)
Iteration 2
  • Nested Loops
  • Break
  • Continue
Read: Python for Everybody, 6.4
Read (Optional): Sweigart Ch 2
Interactive Exercises
Link to worksheet: pdf, docx
Louis's Lecture: code
Mike's Lecture: code
Due: Quiz 3 (11:59:00 pm)
Assigned:

Week 5

Mon: (Sep 30)
Iteration Practice
  • for loops
  • Count, min, max, filtering
  • Nested loop tracing
Read: Python for Everybody, 6.5 - end
Link to worksheet: pdf
Link to solution notebook: notebook
Louis's Lecture: code
Mike's Lecture: code
Wed: (Oct 02)
Exam 1 review in lecture
  • Regular: Wednesday 7:30 to 9:00 pm
  • McBurney: Wednesday 5:45 to 8:45 pm
  • Alternate: Thursday 5:45 to 7:15 pm
  • Makeup: Monday 5:45 to 7:15 pm
Due: P4
Assigned:
Fri: (Oct 04)
Strings
  • Comparison
  • String methods
  • Strings are Sequences
  • Indexing & Slicing
  • For Loop, range()
Read: Downey Ch 8
Read: Python for Everybody, Ch. 7
Optional: Downey Ch 9
Link to worksheet: pdf, docx
Due: Student Information Survey 2
Louis's Lecture: code
Mike's Lecture: code
Part 2: State

Week 6

Mon: (Oct 07)
Lists
  • Lists are Sequences
  • Indexing & Slicing
  • Lists are Mutable
  • List Methods
Read: Downey Ch 10
Read: Python for Everybody, Ch. 9
Louis's Lecture: code
Mike's Lecture: code
Wed: (Oct 09)
CSV Files
  • Comparison to Spreadsheets
  • Format
  • Headers
  • Lists of lists
Read: Sweigart Ch 16 (through "Reading Data from Reader Objects in a for Loop")
Louis's Lecture: code
Mike's Lecture: code
Due: P5
Assigned:
Fri: (Oct 11)
List Practice
  • Coding Demos
  • Use the set data type for removing duplicates
  • Create and use helper functions for filtering
  • Use the sort and sorted functions
Link to worksheet: pdf, docx
Louis's Lecture: code
Mike's Lecture: code
Due: Quiz 4 (11:59:00 pm)
Assigned:

Week 7

Mon: (Oct 14)
Dictionaries 1
  • Syntax
  • Lookup
  • Insert
  • Pop
Read: Downey Ch 11 ("A Dictionary is a Mapping" through "Looping and Dictionaries")
Read: Python for Everybody, 10.1 - 10.7
Interactive Exercises
Louis's Lecture: code
Mike's Lecture: code
Wed: (Oct 16)
Dictionaries 2
  • Nesting
  • dict of lists
  • list of dicts
  • dict of dicts
Read: Downey Ch 11 ("Dictionaries and Lists" and "Global Variables" to end)
Louis's Lecture: code
Mike's Lecture: code
Due: P6
Assigned:
Fri: (Oct 18)
JSON
  • Deserialization
  • Serialization
  • Python/JSON dfferences
Read: Sweigart Ch 16
Link to worksheet: pdf, docx
Louis's Lecture: code
Mike's Lecture: code
Due: Quiz 5 (11:59:00 pm)

Week 8

Mon: (Oct 21)
Objects & Tuples
  • Mutability
  • References
  • tuple
  • namedtuple
Read: Downey Ch 10 ("Objects and Values" and "Aliasing") and Ch 12
Read: Python for Everybody, 11.1 - 11.7
Interactive Exercises
Louis's Lecture: code
Mike's Lecture: code
Wed: (Oct 23)
Copying
  • References
  • Shallow Copy
  • Deep Copy
Read: Sweigart Ch 4 ("References" through the end)
Interactive Exercises
Link to worksheet: pdf, docx
Link to worksheet solutions: pdf
Louis's Lecture: code
Mike's Lecture: code
Due: P7
Assigned:
Fri: (Oct 25)
Recursive Functions
  • 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)
Interactive Exercises
Louis's Lecture: code
Mike's Lecture: code
Due: Quiz 6 (11:59:00 pm)

Week 9

Mon: (Oct 28)
Function References
  • functions as objects
  • sort
  • lambda
Read: Python for Everybody, 10.8
Louis's Lecture: code
Mike's Lecture: code
Wed: (Oct 30)
Comprehensions
  • review sorting
  • list comprehensions
  • dict comprehensions
Read: Downey Ch 19.2, 12.3
Link to worksheet: pdf, docx
Link to worksheet solutions: pdf
Louis's Lecture: code
Mike's Lecture: code
Due: P8
Assigned:
Fri: (Nov 01)
Error Handling
  • Assert Statements
  • Catching Exceptions
  • Throwing Exceptions
Read: Sweigart Ch 11 (beginning through "Assertions")
Interactive Exercises
Link to worksheet: pdf, docx
Louis's Lecture: code
Mike's Lecture: code
Due: Quiz 7 (11:59:00 pm)

Week 10

Mon: (Nov 04)
Files and Directories
  • Reading
  • Writing
  • os module
Read: Downey Ch 14
Louis's Lecture: code
Mike's Lecture: code
Wed: (Nov 06)
Exam 2 review in lecture
  • Regular: Wednesday 7:30 to 9:00 pm
  • McBurney: Wednesday 5:30 to 8:30 pm
  • Alternate: Thursday 5:45 to 7:15 pm
  • Makeup: Monday 5:45 to 7:15 pm
Due: P9
Assigned:
Fri: (Nov 08)
Pandas 1
  • Series
  • element-wise operations
  • mean, median, mode, quantiles
Required Reading: Pandas Intro Notebook (HTML or pandas-intro.ipynb)
Louis's Lecture: code
Mike's Lecture: code
Part 3: Data Science

Week 11

Mon: (Nov 11)
Pandas 2
  • DataFrame
  • reading CSVs
Louis's Lecture: code
Mike's Lecture: code
Assigned:
Wed: (Nov 13)
Web 1
  • requests module
  • get
  • status code
  • text files
  • json files
Read: Sweigart Ch 12
Louis's Lecture: code
Mike's Lecture: code
Due: P10
Assigned:
Fri: (Nov 15)
Web 2
  • Intro to HTML
  • Generating HTML list
  • Generating HTML hyperlink
  • Generating HTML table
Louis's Lecture: code
Mike's Lecture: code
Due:

Week 12

Mon: (Nov 18)
Web 3
  • Document Object Model
  • Parsing HTML
  • beautifulsoup
Louis's Lecture: code
Mike's Lecture: code
Wed: (Nov 20)
Database 1
  • why use a database?
  • sqlite3 module
  • querying from Pandas
  • basic query structure
Louis's Lecture: code
Mike's Lecture: code
Due: P11
Due: CS319 Project part 1: proposal (Not applicable to CS220 students)
Due: CS319 Project part 2: data set (Not applicable to CS220 students)
Assigned:
Fri: (Nov 22)
Database 2
  • min, max, sum, avg
  • count, distinct
  • group by
  • having
Louis's Lecture: code
Mike's Lecture: code
Due: Quiz 9 (11:59:00 pm)

Week 13

Mon: (Nov 25)
Plotting 1
  • bar plots
  • customizing plots
  • setting the index
  • making a bar for 'other'
Read: Matplotlib Intro (HTML or matplotlib-intro.ipynb and data)
Louis's Lecture: code
Mike's Lecture: code
Wed: (Nov 27)
Plotting 2
  • scatter plots
  • correlation
Read: Line and Advanced Bar Plots (HTML, line-and-bar.ipynb and data)
Louis's Lecture: code
Mike's Lecture: code
Fri: (Nov 29)
Thanksgiving Break
  • No Class

Week 14

Mon: (Dec 02)
Database 3
  • Worksheet
  • Pandas <--> SQL
Link to worksheet: pdf, docx
Link to worksheet solution (partial): pdf
Louis's Lecture: code
Mike's Lecture: code
Wed: (Dec 04)
Advanced Pandas Topics
  • np.NAN, isna, dropna, fillna
  • set_index
  • replace, apply
  • groupby
  • SQL vs pandas
Due: P12
Due: CS319 Project part 3: initial questions (Not applicable to CS220 students)
Assigned: Louis's Lecture: code
Mike's Lecture: code
Fri: (Dec 06)
Plotting 3
  • line plots
  • multiple line plots
  • multiple bar plots
Read: Line and Advanced Bar Plots (HTML, line-and-bar.ipynb and data)
Louis's Lecture: code
Mike's Lecture: code
Due: Quiz 10 (11:59:00 pm)

Week 15

Mon: (Dec 09)
Plotting 4
  • axes limits
  • logarithmic axes
  • subplots
  • adjacent plots
Read: Line and Advanced Bar Plots (HTML, line-and-bar.ipynb and data)
Louis's Lecture: code
Mike's Lecture: code
Wed: (Dec 11)
Review/Catchup
  • Bring Questions
  • No work accepted after today. No late days or extensions may be used.
Due: P13
Due: CS319 Project part 4: final project (Not applicable to CS220 students)
Assigned: Louis's Lecture: code
Fri: (Dec 13)
Finals Begin
  • No Class

Week 16

Saturday: Final Exam (Dec 14)
Regular: 12/14/2024 7:25 pm - 9:25 pm
McBurney: TBD
Alternate: TBD
Makeup: TBD
Lab Project Survey