Lecture Schedule

Part 1: Basic Programming

Week 1

Mon: (Sep 3)
No Class
Wed: Introduction (Sep 5)
  • Class Overview
  • Hardware
  • Software
Link to Slides
Fri: The Terminal (Sep 7)
  • Terminal Emulatation
  • Shells
  • Navigation
  • Program Execution
Link to Slides

Week 2

Mon: Computation (Sep 10)
  • Pseudocode
  • State
  • Flow of Execution
Link to Worksheet
No Slides
Wed: Bits and Memory (Sep 12)
  • Bits+bytes
  • Memory organization
  • Representing information as bits
Link to Slides
Due: P0 (ungraded)
Fri: Programming (Sep 14)
  • Syntax+Parsing
  • Values+Types
  • Calculation+Operators
  • Boolean Logic
  • Interactive vs. Script Mode, print
Link to Slides
Read: Downey Ch 1

Week 3

Mon: Vars and Exprs (Sep 17)
  • Naming Rules
  • Assignment
  • Types of errors
  • Comments
Link to Slides
Read: Downey Ch 2
Wed: Using Functions (Sep 19)
  • Functions
  • input, str funcs, float funcs
  • Arguments, Return Values
  • Importing Modules
  • Math Module
Link to Slides
Read: Downey Ch 3 ("Function Calls" to "Composition")
Due: P1
Fri: Creating Functions (Sep 21)
  • 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

Week 4

Mon: Function Scope (Sep 24)
  • Local vs. Global
  • Argument Passing
  • Frames
  • Stack Diagrams
Read: Downey Ch 3 ("Parameters and Arguments" to end)
Link to Slides
Wed: Conditions (Sep 26)
  • Boolean Logic
  • if,elif,else
  • Reading Nested Code
  • True and "Truthy"
  • Modular arithmetic
Link to Slides
Link to Worksheet
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
Due: P2
Fri: Iteration (Sep 28)
  • Reassignment
  • While Loop
  • Infinite Iteration
Link to Slides
Read: Downey Ch 7

Week 5

Mon: Advanced Iteration (Oct 1)
  • Break
  • Continue
Link to Slides
Link to Worksheet
Wed: Review Day (Oct 3)
Due: P3
Fri: Strings (Oct 5)
  • Indexing/Slicing
  • Sequences
  • For Loop, range()
  • Searching
  • Comparison
  • String formatting
Link to Slides
Link to Worksheet
Read: Downey Ch 8
Optional: Downey Ch 9
Part 2: Working with Data

Week 6

Mon: Lists (Oct 8)
  • Sequence, Like a String
  • Indexing, Slicing
  • sys.argv, dir()
  • Mutable vs. Immutable
  • List Methods
Link to Slides
Read: Downey Ch 10
Wed: CSV Tables (Oct 10)
  • 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: P4
Fri: List Practice (Oct 12)
  • Coding Demos
Link to Worksheet
No Slides

Week 7

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

Week 8

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

Week 9

Mon: Advanced Functions (Oct 29)
  • iterators and generators
  • references to functions
Link to Slides
Wed: Error Handling (Oct 31)
  • Catching Exceptions
  • Throwing Exceptions
  • Asserts
Link to Slides
Link to Worksheet
Read: Sweigart Ch 10 (beginning through "Assertions")
Due: P7
Fri: Files and Directories (Nov 2)
  • Reading
  • Writing
  • Listing children
Link to Slides
Read: Downey Ch 14

Week 10

Mon: Pandas 1 (Nov 5)
  • iPython
  • dataframe
  • series
  • reading CSVs
  • element-wise operations
Reading: CS 301 Notes (Notebook)
Wed: Review Day (Nov 7)
Fri: Pandas 2 (Nov 9)
  • practice
Link to Worksheet
Part 3: Data Science

Week 11

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

Week 12

Mon: Database 1 (Nov 19)
  • schemas/types
  • queries
  • where
  • SQLite
  • Querying from Pandas
Link to Slides
Wed: Database 2 (Nov 21)
  • Worksheets
Link to Worksheet
Due: P9
Fri: Thanksgiving Break (Nov 23)
  • No Class

Week 13

Mon: Database 3 (Nov 26)
  • aggregates
  • group by
Link to Slides
Wed: Plotting 1 (Nov 28)
  • pie charts
  • scatter plots
  • plot design
  • AxesSublot
Reading: CS 301 Notes (Notebook)
Fri: Plotting 2 (Nov 30)
  • line plots
  • bar plots
Reading: CS 301 Notes (Notebook)

Week 14

Mon: Plotting 3 (Dec 3)
  • axes
  • adjacent plots
  • design decisions
Reading: CS 301 Notes (Notebook)
Wed: Plotting (Dec 5)
  • Catchup
Fri: Regression (Dec 7)
  • numpy
  • fit line
  • least-squares method
Link to Slides

Week 15

Mon: Randomness (Dec 10)
  • Debugging
  • Simulation
  • Significance
Link to Slides
Wed: Review/Catchup (Dec 12)
  • Bring Questions
Link to Worksheet
Due: P10 (final project)