Fall 2024 class meetings are 1:30-2:35 on Monday, Wednesday, and Friday in SB 382. Labs are on Thursday, 12:15-1:55pm in SB 354 (the “Gold” lab).
Note that we count the week of Advising as “Week 7.5”.
Assignments ¶
A summary of the assignments you completed this semester:
Homework ¶
Homework due dates alternate with Forum due dates.
- Homework 1 (W2): initials
- Homework 2 (W3): flag
- Homework 3 (W5): misc practice on ZyBooks
- Homework 4 (W7): population simulation (conditional logic, data structures)
- Homework 5 (W8): Testing Goldbach’s Conjecture (loops, functions, data structures)
Optional Practice Exercises ¶
- Leibniz formula (W5)
Labs ¶
- Lab 1: “Hello, world”, squares, star
- Lab 2: stick figure, number puzzle
- Lab 3: user id, sorting
- Lab 4: automobile service cost, checkerboard, Zeller’s Congruence
- Lab 5: Hailstone, binary, spirograph
- Lab 6: functions practice, search, unique
Forums ¶
- Forum 1: introductions
- Forum 2: Is technology neutral?
- Forum 4: technology and creation
Week 1 ¶
Wednesday ¶
- Overview slides
- Why computing?
- Welcome
- Support available
Thursday ¶
- Lab 1
- 1.A: “Hello, world” (
print, ZyLabs workflow) - 1.B: Squares (
input, variables) - 1.C: Star (
turtle)
- 1.A: “Hello, world” (
Checklist before you leave:
- Each partner has submitted a full version of each section.
- You’ve answered the reflection questions on Moodle (“Lab 1”)
- You’ve done the quiz (survey).
- You’ve celebrated writing your (first?) interesting programs!
You might want to start on the homework too! Hints:
- Start with something you know works… like your star.
- pen.penup()
- You don’t have to use forward() and right(); you can also use pen.goto()
Friday ¶
- Lab review
- POGIL 1.2 together
- POGIL 1.3 in teams
Logistics
- Office hours poll
Week 2 ¶
Monday ¶
- Logistics reminders:
- Reading 2 due tonight
- Homework 1 due tomorrow (instructions and submit on ZyBooks)
- Forum 1 due tomorrow (introduce yourselves, initial response to a video)
- Generally Homework and Forum posts will be due on alternate weeks
- complete office hours poll
- Week 1 Reflections due tonight
- Reminder of support available
- Study Sessions M/R 7-9pm SB337
- Piazza
- CodeHelp
- Intro to retrieval practice (presentation on Moodle)
- Retrieval Quiz 2.1
- POGIL 2.1 and 2.3 (skip 2.2) in teams
Wednesday ¶
- Logistics reminders
- Readings 1 and 2 should be done by now.
- If you didn’t complete Quiz 1, let me know and I’ll reopen.
- 1:30pm: Retrieval Quiz 2.2 (back to Socrative)
- 1:40pm (15 min) POGIL 2.2 in teams
- 1:55pm (10 min) Reviewing POGIL 2.1 and 2.3
- 2:05pm: Slides 2
- 2:25pm: Lab 2.A together
Friday ¶
- Logistics reminders
- Reading 3: Monday
- Week 2 Reflections: Monday
- Homework 2: Tuesday
- Forum 2: initial posts due Tuesday
- 1:30pm: Retrieval Quiz 2.3
- 1:40pm: Lab review
- Compare algorithms for stick figure
- Code style for number puzzle
turtle.circlevspen.circle
- 2:00pm: Break: SIGCHI
- 2:10pm: Slides
- identity, value and type
int()andfloat()- escape characters
- limits of
intandfloat
Week 3 ¶
Monday ¶
- Office Hours: Tuesdays 1:30-3pm, or message me and we’ll find a time.
- Some weeks I might be in the Study Sessions room (SB 337)
- Logistics reminders
- Reading 3: tonight
- Week 2 Reflections: tonight
- Homework 2: tomorrow
- Forum 2: initial posts due tomorrow
- Quiz 2 Friday
- 1:30pm: Retrieval Quiz 3.1
- POGIL 3 in teams
- 1:45pm: Model 1 (Lists, 10 min)
- 1:55pm: Model 2 (Sequences, 15 min)
- 2:10pm: Model 3 (Dictionaries, 20 min)
- 2:30pm Review
Wednesday ¶
- Logistics reminders
- Check your grades on Moodle. Reach out to me if anything is missing (even if it’s your fault) except for:
- Homework 2
- Socrative grades
- Reflection 2
- Quiz 2 IN CLASS Friday. Review the readings, POGILs, slides, Socrative quizzes, etc.
- Check your grades on Moodle. Reach out to me if anything is missing (even if it’s your fault) except for:
- 1:30pm: Retrieval Quiz 3.2
- 1:40pm: Slides 3, maybe return to Slides 2 to discuss limits
- Assignment statements vs item assignment statements
Thursday ¶
- Lab 3
- We did Lab 3.A together here, since we didn’t get to it on Wednesday.
Friday ¶
- Logistics reminders
- see the Moodle Calendar
- Quiz 2 IN CLASS today
- Reflection 3 due Monday
- Forum 2 revised posts due Tuesday
- 1:30pm: Retrieval Quiz 3.3
- 1:40pm: Lab code review
- 1:50pm: Slides: data structures review; is tech neutral?
- 2:15pm: Quiz 2
Week 4 ¶
Monday ¶
- Logistics reminders
- Reading 4: tonight
- Reflection 3: tonight
- Forum 2: revised posts due tomorrow
- 1:30pm: Retrieval Quiz 4.1
- 1:45pm: Quiz 2 return and review
- 1:50pm: Intro to Control Structures
- POGIL 4 in teams:
- 2:00pm: Model 1 (comparison operators)
- 2:10pm: Model 2 (if statements)
- 2:25pm: Model 3 (boolean operations) (we won’t finish this today)
Wednesday ¶
- Logistics reminders
- Quiz 3 on Moodle (opens Friday, closes Monday)
- Homework 3 due next Tuesday (on ZyBooks)
- Forum 3 initial posts due next Tuesday
- 1:30pm: Retrieval Quiz 4.2
- 1:40pm: POGIL 4.3 in teams (20 min)
- If finished, review Teacher version
- 2:00pm: Slides 4
booltypeifstatementselseandelif
- 2:25pm: Lab 4.A together
Thursday ¶
- Encouragement:
- We’re getting into more difficult material now.
- It’s normal to feel like you’re not getting it. Keep practicing and be patient with yourself.
- Resources to help:
- Study Sessions (tonight and Monday night)
- Office hours (Tuesdays 1:30-3pm)
- CodeHelp
- Piazza
- Psalm 23:1-3
- Lab 4
- 4A: Automobile service cost (
ifstatements,else,elif) - 4B: Checkerboard (boolean operations, preview of functional abstraction, loops, and flag variables)
- 4C: Zeller’s Congruence
- 4A: Automobile service cost (
Friday ¶
- Logistics reminders
- Reading 5: Monday
- Reflection 4: Monday
- Homework 3: Tuesday
- Forum 3: initial posts due Tuesday
- Quiz 3 on Moodle, opens after class today, closes before class Monday
- 1:30pm: Retrieval Quiz 4.3
- 1:35pm: Lab review
- 1:50pm: Slides and exercises
- Areas of Computing Highlight: SIGGRAPH. Video
Week 5: Looping ¶
Monday ¶
- Logistics reminders
- Reading 5: tonight
- Reflection 4: tonight
- Homework 3: tomorrow
- Forum 4: initial posts due tomorrow (or they should have been, but I messed up Moodle)
- Quiz 3 closes now (if you forgot, let me know)
- Quiz 4: in class on Friday
- 1:30pm: Retrieval Quiz 5.1
- Scripture: Genesis 1 (slide)
- 1:55pm: POGIL 5 in teams
- Model 1:
forstatements (15 min)- Report: What is
x? (#6) - Report: What if we use
[]in the loop? (#4)
- Report: What is
- 2:10pm: Model 2: The
rangefunction (15 min)- Report: When would you use for-in-range vs for-in-list?
- Skip 13c, it’s tricky.
- Hint:
chr(65)
- If you’re getting ahead, you may go to Model 3:
whilestatements (15 min)
- Model 1:
- Exercises involving loops
Wednesday ¶
- Logistics reminders
- Quiz 4 in class on Friday
- Forum 4 revised posts due next Tuesday
- Reminder to cite other students. Cite different people than Forum 2.
- Use paragraphs to organize your thoughts.
- Use full names of classmates (we have two Davids and two Ryans)
- Homework 4 due the following Tuesday
- 1:30pm: Retrieval Quiz 5.2
- Intro to Homework 4
- 1:40pm: POGIL 5.3 (
whilestatements) (15 min)- Review the Teacher version if you finish early; start writing Week 5 Reflections.
- 2:00pm: Slides and exercises
- 2:25pm: Lab 5.A together
Thursday ¶
Lab 5
- 5A: range practice
- 5B: Hailstone (
whileloop,ifstatements) - 5C: Binary (
whileloop, accumulator pattern) - 5D: Spirograph
optional labs:
- 5E: sum of numbers in range (accumulator pattern)
- 5F: cumulative sum (accumulator pattern again!)
Friday ¶
- Logistics reminders
- Reading 6: Monday
- Reflection 5: Monday
- Forum 4: revised posts due Tuesday
- Homework 4: week after Tuesday
- Quiz 4: in class today
- 1:30pm: Retrieval Quiz 5.3
- 1:35pm: Lab review
- 1:50pm: Slides and exercises
- 2:15pm: Quiz 4
Week 6: Functions ¶
Monday ¶
- Logistics reminders
- Reading 6: tonight
- Reflection 5: tonight
- Homework 4: week after tomorrow
- Forum 4: revised posts due tomorrow
- Poll for whether to do another Moodle quiz this week
- 1:30pm: Retrieval Quiz 6.1
- 1:35pm: Return of Quiz 4
- 1:50pm: Demo of functions: turtle graphics (shapes, click handlers)
- 2:05pm: POGIL 6 in teams (refer to POGIL 6 code)
- Model 1: Flow of Execution (20 min)
- Don’t worry about “drawing” on your PDF (questions 8 and 12)
- To convert a string
xto a list, uselist(x)
- Model 2: Passing Arguments (15 min)
- Model 1: Flow of Execution (20 min)
- We probably won’t get to Model 3 today, but you’re welcome to start it if your team is ahead.
Wednesday ¶
- Logistics reminders
- no quiz this week
- Homework 4: due next Tuesday
- Forum 6: initial posts due next Tuesday
- 1:30pm: Retrieval Quiz 6.2
- 1:40pm: POGIL 6.3 in teams (15 min)
- Model 3: Returning Values
- If you finish early, review the Teacher version
- 2:00pm: Slides 6
- 2:25pm: Lab 6.A together
Reference Turtle code for 5-pointed star:
import turtle
screen = turtle.Screen()
pen = turtle.Turtle()
for i in range(5):
pen.forward(100)
pen.right(144)
screen.mainloop()
Thursday ¶
Lab 6
- 6A: functions practice
- 6B: search
- 6C: unique
If you finish early, either do the optional labs from last week, or try making a Turtle click handler:
screen = turtle.Screen()
pen = turtle.Turtle()
pen.speed('fastest')
# whenever screen gets clicked, make the turtle go to that place
def handle_click(x, y):
print(x, y)
# TODO
screen.onclick(handle_click)
screen.mainloop()
Extensions:
- Make two turtles that move in mirror image to each other.
- Extend the checkerboard lab so that the user can click on a square to change its color.
Friday ¶
- Logistics reminders
- Reading 7: Monday
- Reflection 6: Monday
- Homework 4: Tuesday
- Forum 6: initial posts due Tuesday
- 1:30pm: Retrieval Quiz 6.3
- 1:35pm: Lab review: compare lab 6 code with someone you didn’t work with.
- what was challenging
- the point of
unique
- 1:50pm: Slides and exercises
Week 7: Sequence Data ¶
Monday ¶
- Logistics reminders
- Reading 7: tonight
- Reflection 6: tonight
- Homework 4: tomorrow
- Forum 6: initial posts due tomorrow
- I may be late to office hours this week (Tuesday 1:30-3pm) because of an off-campus appointment.
- Lab 7: Thursday
- Fall Break Friday (no quiz)
- 1:30pm: Retrieval Quiz 7.1
- 1:35pm: POGIL 7 in teams
- 1:40-1:55pm Model 1: Working with Lists (15 min)
- 1:55-2:10pm Model 2: Indexing and Slicing (15 min)
- 2:10-2:25pm Model 3: Common String Methods (15 min)
- 2:25pm: Review Slides 6, if time permits
Wednesday ¶
- Logistics reminders
- No M/W/F class meetings for a week (Friday and Monday are Fall break; next Wednesday is Advising), so Week 7 continues next week as “Week 7.5”
- However: Lab 7 this Thursday, Lab 7B next Thursday. Both are due on the Friday of advising week.
- No office hours during Advising week.
- Forum 6: revised posts due Saturday after Advising break
- Quiz next Friday after Advising break
- Reading 8: Monday after Fall Break
- Reflection 7: Monday after Fall Break
- Homework 5: due Tuesday after Fall Break
- 1:30pm: Retrieval Quiz 7.2
- 1:40pm: Homework 4 samples
- Slides and exercises on sequences
- 2:25pm: Lab 7.A together
Thursday ¶
Lab 7
- 7A: strings practice (name format)
- 7B: SSN validation
- 7C: password validation
- 7D: max so far
Friday ¶
Fall break.
Week 7.5 ¶
Monday ¶
Fall break.
Wednesday ¶
Advising break.
Thursday ¶
Lab 7B
- Phone number breakdown
- Cumulative Sum of Odds
- Remove all non-alpha characters
- Acronyms
- Credit Card Validation
Friday ¶
- Logistics reminders
- Reading 8: Monday
- Reflection 7: Monday
- Homework 5: Tuesday
- Forum 6: revised posts due Saturday
- no quiz today
- 1:30pm: Retrieval Quiz 7.3
- 1:35pm: Lab review and discussions
Week 8: Object-Oriented Programming (Classes) ¶
Monday ¶
- Logistics reminders
- Reading 8: tonight
- Reflection 7: tonight
- Homework 5: tomorrow
- Forum 8: initial posts due tomorrow
- Quiz 5: in class on Friday
- 1:30pm: Retrieval Quiz 8.1
- 1:40pm: Intro to Object-Oriented Programming
- 1:45pm: POGIL 8 in teams
- 1:45-2:00pm Model 1: Attributes and Methods (15 min)
- 2:00-2:15pm Model 2: Constructors (15 min)
- 2:15-2:30pm Model 3: Object-Oriented (15 min)
Wednesday ¶
- Logistics reminders
- Quiz 5 in class on Friday
- Forum 8: revised posts due next Tuesday
- First project milestone due next Saturday
- 1:30pm: Retrieval Quiz 8.2
- 1:40pm: Slides and exercises
- 2:25pm: Lab 8.A together
Thursday ¶
Lab 8
- 8A: Class practice (Food items)
- 8B: Constructing Employee objects (also, reading from a file)
- 8C: Employee statistics (working with objects; list and dictionary practice)
Friday ¶
- Logistics reminders
- Quiz 5: in class today
- Reading 9: Monday
- Reflection 8: Monday
- Forum 8: revised posts due Tuesday
- Homework 6: a week from Tuesday
- 1:30pm: Retrieval Quiz 8.3
- 1:35pm: Lab review
- 1:55pm: Perspectival discussion:
What are some concrete things that you, as a programmer, could do to accomplish what Calvin views as its mission?
Think about some technology or application that might or might not support this mission.
How might it do better?
- 2:15pm: Quiz 5
Week 9: Python for Data Science 1 ¶
Monday ¶
- Logistics reminders
- Reading 9: tonight
- Reflection 8: tonight
- Forum 8: revised posts due tomorrow
- Homework 6: a week from tomorrow
- Quiz 5: returned today
- Remaining quizzes: Fridays 11/8, 11/22, 12/6
- Is there interest in Moodle quizzes on alternate weeks? If so, timeline? (result: yes, Moodle every other week, opening after class on Friday, closing end-of-day Monday)
- 1:30pm: return and review of Quiz 5
- 1:40pm: Intro to Python for Data Science
- 1:50pm: POGIL 9 in teams
- 1:50-2:05pm Model 1: Simple Plot (15 min)
- 2:05-2:20pm Model 2: Histograms (10 min)
- 2:20-2:35pm Model 3: CSV Data (20 min)
Wednesday ¶
- Logistics reminders
- Remaining quizzes: alternating between in-class and Moodle over the weekend (opening after class Friday, closing Monday end-of-day). Tentative plan:
- Quiz 6: Moodle this weekend
- Quiz 7: in class Friday 11/15
- Quiz 8: Moodle 11/22
- Quiz 9: in class 12/6
- Project Initial Proposals due Saturday!
- Reading 10: Monday
- Reflection 9: Monday
- Homework 6: Tuesday
- Forum 10: initial posts due Tuesday
- Remaining quizzes: alternating between in-class and Moodle over the weekend (opening after class Friday, closing Monday end-of-day). Tentative plan:
- 1:30pm: logistics reminders, Project instructions including new resources
- 1:40pm: Project proposal brainstorming
- 1:50pm: POGIL 9.3 in teams
- if you finished on Monday, review the Teacher version
Thursday ¶
Lab 9
- 9A: Plotting temperatures
- 9B: Plotting the Collatz sequence
Friday ¶
- Logistics reminders
- Quiz 6: Moodle this weekend
- Project Initial Proposals due tomorrow
- Reading 10: Monday
- Reflection 9: Monday
- Homework 6: Tuesday
- Forum 10: initial posts due Tuesday
- 1:30pm: Retrieval Quiz 9.3
- 1:35pm: Lab review
- What was wrong with the broken plot?
- 1:45pm: Demos of project sample code
- 2:00pm: Slides and exercises on NumPy and plotting
Week 10: Python for Data Science 2 ¶
Monday ¶
- Logistics reminders
- Reading 10: tonight
- Reflection 9: tonight
- Homework 6: tomorrow
- Forum 10: initial posts due tomorrow
- Quiz 6: closes tonight
- Quiz 7: in class on Friday
- 1:30pm: Retrieval Quiz 10.1
- pandas!
- Slides and Exercises
Wednesday ¶
- Logistics reminders
- Quiz 7: in class on Friday
- Forum 10: revised posts due next Tuesday
- Reading 11: Monday
- Reflection 10: Monday
- I’m working on feedback for project proposals.
- 1:30pm: Retrieval Quiz 10.2
- Go over Quiz 6
- Intro to Streamlit
- Note: streamlit will not be assessed (beyond lab exercises), but pandas and numpy will be (to the extent discussed in slides and exercises).
- SIG Spotlight: SIGACCESS: TACCESS, ASSETS
- Slides and Exercises: more pandas
Thursday ¶
Lab 10
- Temperature Converter
- Employees
- Climate
Friday ¶
- Logistics reminders
- Quiz 7: in class today
- Reading 11: Monday
- Reflection 10: Monday
- Homework 7: a week from Tuesday
- Forum 10: revised posts due Tuesday
- 1:30pm: Retrieval Quiz 10.3
- Lab review
- Slides and Exercises
- 2:15pm: Quiz 7
Week 11: Nested Structures ¶
Monday ¶
- Logistics reminders
- Reading 11: tonight
- Reflection 10: tonight
- Homework 10: a week from tomorrow
- Forum 10: revised posts due tomorrow
- Quiz 8: Moodle this weekend
- no Socrative today
- Project check-ins, reminder of project resources, and event handling using callback functions
- 1:55pm: POGIL 11 in teams: Nested Structures
- Model 1: Lists of Lists (15 min)
- Model 2: Nested
forLoops (15 min) - Model 3: Nested Dictionaries (15 min)
Examples:
- Can a Rubik’s Cube be brute-forced?
- There are Exactly 14 Different Games of Tic-Tac-Toe - YouTube and follow-ups: Actually, Maybe There’s Only 1 Game of Tic-Tac-Toe - YouTube and There are exactly 8.4 Trillion Trillion games of 3D Tic-Tac-Toe - YouTube
Wednesday ¶
- Logistics reminders
- Note “examples” from yesterday
- Pitch SIL project?
- Quiz 8: Moodle this weekend
- Reading 12: Monday
- Reflection 11: Monday
- Homework 10: Tuesday
- 1:30 Retrieval Quiz 11.2
- Review of Quiz 7
- Intro to Image Processing
- Lab Prep
Thursday ¶
Lab 11: Image Processing
Friday ¶
- Logistics reminders
- Quiz 8: Moodle this weekend
- CS 262 User Testing sign-ups
- Reading 12: Monday
- Reflection 11: Monday
- Homework 10: Tuesday
- Forum 12 won’t be due until after Thanksgiving.
- 1:30pm: Retrieval Quiz 11.3
- Lab review
- Bonus: Random-choice algorithm
- Other applications of nested structures:
- Matrix multiplication
- Diffusion (Heat Equation) and waves
Google Quick-Draw dataset: download a file from here and save it in the same directory as a Python script with the following code:
import json
import numpy as np
import turtle
pen = turtle.Turtle()
filename = "YOUR_FILENAME_HERE.ndjson"
data = []
with open(filename) as f:
for line in f:
data.append(json.loads(line))
if len(data) > 100:
break
drawing = data[50]['drawing']
for stroke in drawing:
stroke = np.array(stroke).T
pen.penup()
for point in stroke:
pen.goto(point[0], -point[1])
pen.down()
In our exploration together we’ll use the following function:
def rotation_matrix(theta):
return np.array([
[np.cos(theta), -np.sin(theta)],
[np.sin(theta), np.cos(theta)]])
Week 12: Bonus (Thanksgiving week) ¶
Monday ¶
- Logistics reminders
- Quiz 8 closes tonight
- grades will need manual review; don’t worry if Moodle shows a low score at first
- Reading 12: tonight
- Reflection 11: tonight
- Homework 10: tomorrow
- Forum 12: posts due Tuesday after break
- Quiz 8 closes tonight
- No Socrative today
- CS 262 project pitches: CS 262 User Testing sign-ups
- Modules POGIL (just Model 1)
- Bonus slides as time permits
No class the rest of the week (Thanksgiving break) ¶
Week 13: Recursion and Other Topics ¶
Monday ¶
- Logistics reminders
- Reading 13: tonight
- no Reflection 12 (since last week was short)
- Quiz 9: Friday
- Project Walkthrough Meetings: reach out to me to schedule
- 1:30pm: Retrieval Quiz 13.1
- Review of Quiz 8
- Recursion POGIL (Models 1 and 2 only)
- If time: intro to LLMs
Wednesday ¶
- Logistics reminders
- Quiz 9: in class on Friday
- Reading 14: Monday
- Reflection 13: Monday
- Final forum
- Sign up for a walkthrough meeting.
- Course evaluations (and Socrative quiz)
- Logistics reminders
- Intro to Lab (bear-fish simulation)
- CS Application Spotlight: history
- Slides: Data vs Code
- LLM Exploration
Note: instead of using the key-saving code I gave in the slides, a much simpler way is to simply go in Thonny Settings, General, and put in the Environment Variables:
LLM_GEMINI_KEY=
and paste the key in the right-hand side (without quotes). Then restart Thonny.
Thursday ¶
Lab: Bear-Fish Simulation
Friday ¶
- Logistics reminders
- Quiz 9: in class today
- Reading 14: Monday
- Reflection 13: Monday
- Project Walthough Meetings
- 1:30pm: Retrieval Quiz 13.3
- Lab review
- Slides
- 2:15pm: Quiz 9
Week 14: Inheritance ¶
Monday ¶
- Logistics reminders
- Reading 14: tonight
- Reflection 13: tonight
- Final Forum tomorrow
- Project Walkthrough Meetings
- We’ll go over Quiz 9 on Wednesday
- No Socrative
- Extending Classes POGIL
- 1:40-1:55pm Model 1: UML Class Diagrams
- 1:55-2:05pm Model 2: Single-Class Approach
- 2:05-2:20pm Model 3: Inheritance
- AI demos
Wednesday ¶
- Logistics reminders
- Project Walkthrough Meetings in progress
- Lab tomorrow: project work (optional)
- Final Showcase next Thursday
- 1:30pm: Retrieval Quiz 14.2
- When you’re done, discuss:
- Most efficient solution to #1? (fewest number of comparisons)
- Most systematic strategy for tracing the loop in #2?
- A nice solution for #3?
- Anything that tripped you up in #4?
- Review of Quiz 9
- Wrap-up slides