- Understand what variables are (containers for data)
- Create and name variables using meaningful names
- Store and update values in variables
- Use variables in print() statements
- Differentiate between strings and integers
- Week 1: Using
print()statements - Week 1: Running Python programs in Thonny
| Time | Activity | Description |
|---|---|---|
| 0-10 min | Recap & Hook | Review Week 1, introduce "scoreboard" concept |
| 10-20 min | New Concept: Variables | score = 0 is like Scratch's "set variable" |
| 20-35 min | Guided Build | Build scoreboard together |
| 35-55 min | Independent Challenges | Tasks A, B, C from student_tasks.md |
| 55-60 min | Wrap-up | Show off scoreboards, preview Week 3 |
- Student can create a variable with
name = value - Student can update variables (
score = score + 10) - Student can print variables and text together
- Student uses meaningful variable names
-
Using undeclared variable
print(score) # NameError if score not created yet
-
Confusing strings vs numbers
score = "100" # String, not number score = score + 10 # TypeError
-
Typos in variable names
score = 100 print(scor) # NameError
Support:
- Provide variable template with blanks
- Use physical objects as "variables" (box labeled "score")
Stretch:
- Track multiple players
- Add health and lives variables
- Calculate percentage:
accuracy = hits / attempts * 100
- Create scoreboard for real game (soccer, Minecraft)
- Try: What happens with negative numbers?
- teacher_notes.md - Full lesson plan
- student_tasks.md - Activities
- week02_scoreboard.py - Starter code