Quick link to Live Python Tutor
Week 1 ¶
Wednesday ¶
- Overview slides
- Welcome
- Why computing (and can’t AI do it all?)
- Support available
- Brief example: logistic map
- POGIL 1.1 together
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 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()
Also finish Reading 1 and work on Forum 1 and Quiz 1 if you haven’t yet.
Friday ¶
- Lab review
- POGIL 1.2
- POGIL 1.3
Upcoming:
- Quiz 1 (survey)
- Homework 1
- Forum 1
- Reading 2 (Monday)
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)
- Week 1 Reflections due tonight
- Quiz 1 (survey) should be done
- Reminder of support available
- Study Sessions M/R 7-9pm SB337
- In-Class Code folder on Moodle
- CodeHelp
- Intro to retrieval practice (presentation on Moodle)
- Retrieval Quiz 2.1 (on Moodle)
- POGIL 2.1 and 2.3 (skip 2.2) in teams
Wednesday ¶
- AI policy and motivation
- Logistics reminders
- Readings 1 and 2 should be done by now. (Did you do Participation exercises?)
- Quiz 1 and Forum 1 should be done by now (let me know if you’ve missed)
- Office Hours times
- Retrieval Quiz 2.2 (on Moodle)
- POGIL 2.2 in teams (15 min); if finished, review POGIL 2.1 and 2.3
- Reviewing POGIL 2.1 and 2.3 (10 min)
- Slides 2 (20 min)
Thursday ¶
Lab 2:
- 2.A: Expressions Practice
- 2.B: Number Puzzle
- 2.C: Regular n-gon
- 2.D (optional): scalable stick figure
Friday ¶
- Logistics reminders
- Reading 3: Monday
- Week 2 Reflections: Monday
- Homework 2: Tuesday
- Forum 2: initial posts due Tuesday
- Quiz 2 next Friday
- Retrieval Quiz 2.3
- Lab review
- Code style for number puzzle
- ngons: how did that code work?
turtle.circlevspen.circle
- Break: SIGCHI
- Slides 2
- identity, value and type
int()andfloat()- binary representations
- Python.org article on floating point
- this is part of the useful Python tutorial
- escape characters
- limits of
intandfloat
Week 3 ¶
Objectives this week:
- Main objectives
- Distinguish sequence types from other types
- Use and recognize string concatenation
- Create and manipulate
lists - Use basic
listmethods and functions including:append();pop();remove();+for concatenation;len();min();max();sum(). - Compare and contrast string, lists, tuples vs. dictionaries
- Create and manipulate
dictionaries (add new entries, update values, remove entries) - Explain how numeric and string data can be represented in a machine
- Explain how fixed-length number representations affect accuracy and precision.
- Compare representations of integers to floating point numbers
- Describe underflow, overflow, round off, and truncation errors in data representations.
- Others
- Use square brackets to index into a string
- Be able to convert numbers between base 2 (binary) and base 10 (decimal)
- Use the math module to perform calculations
Monday ¶
- Retrieval Quiz 3.1
- Logistics reminders
- Reading 3: tonight
- Week 2 Reflections: tonight
- Forum 2: initial posts due tomorrow
- Homework 2: week from tomorrow
- Quiz 2 Friday. Format: questions like
- The following code is intended to something, exactly as we did in some class/lab/homework exercise. But it does not work as intended. (1) Circle one error, (2) Describe what is wrong (in a short phrase), and (3) Rewrite the code to fix that error.
- Give the value of the following Python expressions when evaluated in the Shell. (If an error would occur, describe what error occurs and why.)
- Suppose
x =some expression. Which of the following would print some value? (circle one letter) - Which of the following is the best definition of term from Unit 1 or Unit 2 list of terms
- Fill in the blanks so that the program below prints something.
- POGIL 3 in teams
- Model 1 (Lists, 10 min)
- Model 2 (Sequences, 15 min)
- Model 3 (Dictionaries, 20 min)
- Review
Wednesday ¶
- Retrieval Quiz 3.2 (and finishing 3.1 if needed)
- Logistics reminders
- Quiz 2 IN CLASS Friday. Review the readings, POGILs, slides, retrieval quizzes, etc.
- Slides 3
- Assignment statements vs item assignment statements
Thursday ¶
- Lab 3.A: types practice
- Lab 3.B: login id (string operations)
- Lab 3.C: sorting (list operations, algorithms)
- Lab 3.D: scores (dictionary operations)
Friday ¶
- Logistics reminders
- see the Moodle Calendar
- Quiz 2 IN CLASS today
- Reflection 3 due Monday
- Forum 2 revised posts due Tuesday
- Retrieval Quiz 3.3
- Lab code review
- Slides: data structures review; is tech neutral?
- Quiz 2
Week 4 ¶
Objectives ¶
- Recognize conditional expressions
- Use relational and equality operators
- Define and use boolean operators and expressions
- Apply precedence rules for boolean operators
- Define and use membership operators
- Define and use identity operators
- Use appropriate indentation for correct execution and clarity
- Choose appropriate conditional constructs for a given programming task.
Monday ¶
- Retrieval Quiz 4.1
- Logistics reminders
- Reading 4: tonight
- Reflection 3: tonight
- Forum 2: revised posts due tomorrow
- Motivating conditional logic
- POGIL 4 in teams:
- 10 min: Model 1 (comparison operators) you should hit 2 errors in the table
- 15 min: Model 2 (if statements)
- 20 min: Model 3 (boolean operations)
Section A will do some exercises based on this template, which uses the wordfreq package:
import wordfreq
words = []
for word in wordfreq.iter_wordlist('en'):
words.append(word)
if len(words) > 1000:
break
longest_word = max(words, key=len)
print(longest_word)
Wednesday ¶
- Retrieval Quiz 4.2
- Logistics reminders
- Forums: include last initials when citing
- Homework 3 due next Tuesday (on ZyBooks)
- Forum 3 initial posts due next Tuesday
- Quiz 3 on Moodle any time between now and Monday noon
- Review Quiz 2
- POGIL 4 review
- Maybe: Return to Slides 3 to discuss Perspectives question
- Slides 4
booltypeifstatementselseandelif
- 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
- CodeHelp
- Our World Belongs to God
- Psalm 23:1-3
- Lab 4
- 4A: Automobile service cost (
ifstatements,else,elif– you’ll need all of them.) - 4B: Checkerboard (boolean operations, preview of functional abstraction, loops, and flag variables). Suggestion:
row_is_even = ___,col_is_even = ___. - 4C: Zeller’s Congruence
- 4D: Wind Chill
- 4A: Automobile service cost (
Friday ¶
- Retrieval Quiz 4.3
- Logistics reminders
- Reading 5: Monday
- Reflection 4: Monday
- Homework 3: Tuesday
- Forum 3: initial posts due Tuesday
- Quiz 3 on Moodle closes before class Monday
- Lab review
- Slides and exercises
- Areas of Computing Highlight: SIGGRAPH. Video - last year video
Week 5: Looping ¶
Monday ¶
- Logistics reminders
- Reading 5: tonight
- Reflection 4: tonight
- Homework 3: tomorrow
- Forum 4: initial posts due tomorrow
- Quiz 3 closes
nowend of day today - Quiz 4: in class on Friday
- No retrieval quiz today.
- 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
- 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, but otherwise we’ll finish these on Wednesday.
- Model 1:
- Exercises involving loops
Wednesday ¶
- Retrieval Quiz 5.2
chr(65)reminds me of the Unicode Slide Show- Optional Scripture: Genesis 1 (slide)
- 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 last initials (at least) when citing other students.
- Homework 4 due the following Tuesday
- POGIL 5.3 (
whilestatements) (15 min)- Review the Teacher version if you finish early; start writing Week 5 Reflections.
- Slides and exercises
- Intro to Homework 4
- If time: Lab 5.A together
Study strategies we discussed together:
- Retrieval quizzes (emphasize questions you missed)
- POGIL: start with blank ones, check if you can answer the questions easily
- ZyBooks: retry Participation exercises, try the Challenge problems
- Study Sessions (M/R 7-9pm SB337)
- Slides: we don’t always go through every exercise in the slides, so focus on the ones we didn’t do, as additional practice
- Labs: pick a few, try to re-do them from scratch on your own
- Office hours
Overall:
- Study together
familiarity != understanding- just because it looks familiar doesn’t mean you can do it on your own.
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 ¶
- Retrieval Quiz 5.3
- Logistics reminders
- Reading 6: Monday
- Reflection 5: Monday
- Forum 4: revised posts due Tuesday
- Homework 4: week after Tuesday
- Quiz 4: in class today
- Lab review
- Slides and exercises
- Quiz 4
Week 6: Functions ¶
Monday ¶
- Retrieval Quiz 6.1
- Logistics reminders
- Reading 6: tonight
- Reflection 5: tonight
- Homework 3 should have been due last Tuesday but was accidentally marked “optional” on ZyBooks; bumped to tomorrow
- Homework 4: week after tomorrow
- Forum 3: revised posts due tomorrow
- Quiz 5 on Moodle this weekend
- Demo of functions: turtle graphics (shapes, click handlers)
- 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 3: Returning Values (10 min)
- Model 1: Flow of Execution (20 min)
Wednesday ¶
- Retrieval Quiz 6.2
- Logistics reminders
- Quiz 5: on Moodle, opens Friday, closes Monday before class
- Homework 4: due next Tuesday
- Forum 4: initial posts due next Tuesday
- POGIL 6.3 in teams (15 min)
- Model 3: Returning Values
- If you finish early, review the Teacher version
- Slides 6
- Lab 6.A together
Thursday ¶
- Review local vs global scope from Slides 6
- Lab 6
- 6A: functions practice
- 6B: search
- 6C: unique
If you finish early, you can:
- Do the optional labs from last week
- Try this drawing lab.
- Extend the checkerboard lab so that the user can click on a square to change its color.
Friday ¶
- Retrieval Quiz 6.3
- Logistics reminders
- Quiz 5: on Moodle, closes before class Monday
- Reading 7: Monday
- Reflection 6: Monday
- Homework 4: Tuesday
- Forum 6: initial posts due Tuesday
- Go over Quiz 4
- Lab review: compare lab 6 code with someone you didn’t work with.
- What was challenging?
- What was the point of
get_unique_words? - Try it out with some text files of your own.
- Slides and exercises