Course Schedule: This is an out of date page, do NOT use it for the current semester

Part 1: Control Flow

Week 1

Mon: (Jan 23)
No class
Wed: Introduction (Jan 25)
  • Class overview
  • Resources for getting help
Read: Syllabus
Link to slides
Student Information Survey
Python3 (Anaconda3) installation: Windows, MAC
Anaconda Removal from MAC
Assigned: Lab-P1, P1
Fri: Pseudocode (Jan 27)
  • Flow of execution
  • State
Link to worksheet: pdf, docx
Link to worksheet solutions: pdf
Read: Python for Everybody, Ch. 1

Week 2

Mon: Operators (Jan 30)
  • Syntax, parsing, print
  • Values and types
  • Operator precedence
  • Boolean logic
  • Strings, escape charaters
  • Comments
Read: Downey Ch 1
Read: Python for Everybody, Ch. 2
Additional Reading: Computer terminology
Link to worksheet: pdf, docx
Link to worksheet solutions: pdf
Link to slides
Mike's Lecture: code
Gurmail's Lecture: code
Wed: Vars and Exprs (Feb 01)
  • Naming rules
  • Assignment statements
  • Types of errors
Read: Downey Ch 2 and Appendix A
Read: Python for Everybody, Ch. 3
Due: P1
Link to slides
Mike's Lecture: code
Gurmail's Lecture: code
Assigned 5:00 pm: Quiz 1
Assigned: Lab-P2, P2
Fri: Using Functions (Feb 03)
  • Functions
  • Arguments, return values
  • input, print, type cast functions: int, float, str, bool
  • Importing modules
  • math Module
Read: Downey Ch 3 ("Function Calls" to "Composition")
Read: Python for Everybody, 5.1 - 5.4
Due: Student Information Survey
Due: Quiz1
Link to slides
Mike's Lecture: code
Gurmail's Lecture: code

Week 3

Mon: Creating Functions (Feb 06)
  • 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
Link to worksheet: pdf, docx
Link to worksheet solutions: pdf
Link to slides
Interactive Exercises
Mike's Lecture: code
Gurmail's Lecture: code
Wed: Function Scope (Feb 08)
  • 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
Due: P2
Link to slides
Interactive Exercises
Mike's Lecture: code
Gurmail's Lecture: code
Assigned: Lab-P3, P3
Fri: Conditionals 1 (Feb 10)
  • 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
Due: Quiz2
Link to worksheet: pdf, docx
Link to slides
Interactive Exercises
Mike's Lecture: code
Gurmail's Lecture: code

Week 4

Mon: Conditionals 2 (Feb 13)
  • Nesting
  • Refactoring
Read: Python for Everybody, 4.6 - end (skip 4.7)
Link to slides
Interactive Exercises
Mike's Lecture: code
Gurmail's Lecture: code
Wed: Iteration 1 (Feb 15)
  • While Loop
  • Loop Control Variable
  • Infinite Iteration
  • for i in range
Read: Downey Ch 7
Read: Python for Everybody, 6.1 - 6.3
Due: P3
Link to slides
Mike's Lecture: code
Gurmail's Lecture: code
Assigned: Lab-P4, P4
Fri: Iteration 2 (Feb 17)
  • Nested Loops
  • Break
  • Continue
Read: Python for Everybody, 6.4
Read (Optional): Sweigart Ch 2
Due: Quiz3
Link to slides
Link to worksheet: pdf, docx
Interactive Exercises
Mike's Lecture: code
Gurmail's Lecture: code

Week 5

Mon: Iteration Practice (Feb 20)
  • for loops
  • Count, min, max, filtering
  • Nested loop tracing
Read: Python for Everybody, 6.5 - end
Mike's Lecture: code
Gurmail's Lecture: code
Wed: Exam 1 review in lecture (Feb 22)
  • Regular exam: 5:45 to 7:15 pm
  • McBurney exam: 5:30 to 8:30 pm
Due: P4
Gurmail's Lecture: Notes
Assigned: Lab-P5, P5
Fri: Strings (Feb 24)
  • 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
No quiz
Link to worksheet: pdf, docx
Link to slides
Mike's Lecture: code
Gurmail's Lecture: code
Part 2: State

Week 6

Mon: Lists (Feb 27)
  • Lists are Sequences
  • Indexing & Slicing
  • Lists are Mutable
  • List Methods
Read: Downey Ch 10
Read: Python for Everybody, Ch. 9
Link to slides
Mike's Lecture: code
Gurmail's Lecture: code
Wed: CSV Files (Mar 01)
  • 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
Mike's Lecture: code
Gurmail's Lecture: code
Assigned: Lab-P6, P6
Fri: List Practice (Mar 03)
  • Coding Demos
Due: Quiz4
No slides
Link to worksheet: pdf, docx
Mike's Lecture: code
Gurmail's Lecture: code

Week 7

Mon: Dictionaries 1 (Mar 06)
  • 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
Link to slides
Interactive Exercises
Mike's Lecture: code
Gurmail's Lecture: code
Wed: Dictionaries 2 (Mar 08)
  • Nesting
  • dict of lists
  • list of dicts
  • dict of dicts
Read: Downey Ch 11 ("Dictionaries and Lists" and "Global Variables" to end)
Due: P6
Link to slides
Mike's Lecture: code
Gurmail's Lecture: code
Assigned: Lab-P7, P7
Fri: JSON (Mar 10)
  • Deserialization
  • Serialization
  • Python/JSON dfferences
Read: Sweigart Ch 16
Due: Quiz5
Link to slides
Link to worksheet: pdf, docx
Mike's Lecture: code
Gurmail's Lecture: code

Week 8

Mon: No class (Mar 13)
  • Spring break
Wed: No class (Mar 15)
  • Spring break
Fri: No class (Mar 17)
  • Spring break

Week 9

Mon: Objects & Tuples (Mar 20)
  • 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
Mike's Lecture: code
Gurmail's Lecture: code
Wed: Copying (Mar 22)
  • References
  • Shallow Copy
  • Deep Copy
Read: Sweigart Ch 4 ("References" through the end)
Due: P7
Link to worksheet: pdf, docx
Link to worksheet solutions: pdf
Interactive Exercises
Old Exams (Exam1, Exam2 and Final Exam)
Mike's Lecture: code
Gurmail's Lecture: code
Assigned: Lab-P8, P8
Fri: Recursive Functions (Mar 24)
  • 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: Quiz6
Interactive Exercises
Mike's Lecture: code
Gurmail's Lecture: code

Week 10

Mon: Function References (Mar 27)
  • functions as objects
  • sort
  • lambda
Read: Python for Everybody, 10.8
Mike's Lecture: code
Gurmail's Lecture: code
Wed: Comprehensions (Mar 29)
  • review sorting
  • list comprehensions
  • dict comprehensions
Read: Downey Ch 19.2, 12.3
Due: P8
Link to worksheet: pdf, docx
Link to worksheet solutions: pdf
Mike's Lecture: code
Gurmail's Lecture: code
Assigned: Lab-P9, P9
Fri: Error Handling (Mar 31)
  • Assert Statements
  • Catching Exceptions
  • Throwing Exceptions
Read: Sweigart Ch 11 (beginning through "Assertions")
Due: Quiz7
Interactive Exercises
Link to worksheet: pdf, docx
Mike's Lecture: code
Gurmail's Lecture: code
Part 3: Data Science

Week 11

Mon: Files and Directories (Apr 03)
  • Reading
  • Writing
  • os module
Read: Downey Ch 14
Mike's Lecture: code
Gurmail's Lecture: code
Wed: Exam 2 review in lecture (Apr 05)
  • Regular exam: 5:45 to 7:15 pm
  • McBurney exam: 5:30 to 8:30 pm
Due: P9
Gurmail's Lecture: Notes
Assigned: Lab-P10 , P10
Fri: Pandas 1 (DS topic) (Apr 07)
  • Series
  • element-wise operations
  • mean, median, mode, quantiles
Required Reading: Pandas Intro Notebook (HTML or pandas-intro.ipynb)
No quiz
Mike's Lecture: code
Gurmail's Lecture: code

Week 12

Mon: Pandas 2 (Apr 10)
  • DataFrame
  • reading CSVs
Link to worksheet: pdf
Mike's Lecture: code
Gurmail's Lecture: code
Wed: Web 1 (Apr 12)
  • requests module
  • get
  • status code
  • text files
  • json files
Read: Sweigart Ch 12
Due: P10
Due: CS319 Project part 1: proposal (Not applicable to CS220 students)
Mike's Lecture: code
Gurmail's Lecture: code
Assigned: Lab-P11, P11
Fri: Web 2 (Apr 14)
  • Intro to HTML
  • Generating HTML list
  • Generating HTML hyperlink
  • Generating HTML table
Due: Quiz8
Mike's Lecture: code
Gurmail's Lecture: code

Week 13

Mon: Web 3 (Apr 17)
  • Document Object Model
  • Parsing HTML
  • beautifulsoup
Mike's Lecture: code
Gurmail's Lecture: code
Wed: Database 1 (Apr 19)
  • why use a database?
  • sqlite3 module
  • querying from Pandas
  • basic query structure
Due: P11
Due: CS319 Project part 2: data set (Not applicable to CS220 students)
Mike's Lecture: code
Gurmail's Lecture: code
Assigned: Lab-P12, P12
Fri: Database 2 (Apr 21)
  • min, max, sum, avg
  • count, distinct
  • group by
  • having
Due: Quiz9
Mike's Lecture: code
Gurmail's Lecture: code

Week 14

Mon: Database 3 (Apr 24)
  • Worksheet
  • Pandas <--> SQL
Link to worksheet: pdf, docx
Link to worksheet solution (partial): pdf
Mike's Lecture: code
Gurmail's Lecture: code
Wed: Advanced Pandas Topics (Apr 26)
  • np.NAN, isna, dropna, fillna
  • set_index
  • replace, apply
  • groupby
  • SQL vs pandas
Due: P12
Mike's Lecture: code
Gurmail's Lecture: code
Assigned: Lab-P13, P13
Fri: Plotting 1 (Apr 28)
  • bar plots
  • customizing plots
  • setting the index
  • making a bar for 'other'
Due: Quiz10
Read: Matplotlib Intro (HTML or matplotlib-intro.ipynb and data)
Mike's Lecture: code
Gurmail's Lecture: code

Week 15

Mon: Plotting 2 (May 01)
  • scatter plots
  • correlation
Read: Line and Advanced Bar Plots (HTML, line-and-bar.ipynb and data)
Due: CS319 Project part 3: initial code (Not applicable to CS220 students)
Mike's Lecture: code
Gurmail's Lecture: code
Wed: Plotting 3 (May 03)
  • line plots
  • multiple line plots
  • multiple bar plots
Due: P13
Read: same as for "Plotting 2"
Not a quiz: Practice Plotting Problems
Mike's Lecture: code
Gurmail's Lecture: code
Fri: Review/Catchup (May 05)
  • Bring Questions
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)
Mike's Lecture: code
Gurmail's Lecture: code
No quiz

Week 16

Mon: No class (May 08)
Wed: No class (May 10)
Fri: Regular final exam: 05/12/2023 10:00 am - 12:00 pm
(May 12)
McBurney final exam:05/12/2023 10:00 am - 2:00 pm