Skip to content

Latest commit

 

History

History
76 lines (55 loc) · 2.16 KB

File metadata and controls

76 lines (55 loc) · 2.16 KB

Week 02: Variables - Scoreboard

📚 Learning Objectives

  • 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

🔗 Required Prior Knowledge

  • Week 1: Using print() statements
  • Week 1: Running Python programs in Thonny

⏱️ Lesson Flow (60-75 minutes)

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

🎯 Success Criteria

  • 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

⚠️ Common Student Errors

  1. Using undeclared variable

    print(score)  # NameError if score not created yet
  2. Confusing strings vs numbers

    score = "100"  # String, not number
    score = score + 10  # TypeError
  3. Typos in variable names

    score = 100
    print(scor)  # NameError

📊 Differentiation

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

🏠 Homework

  • Create scoreboard for real game (soccer, Minecraft)
  • Try: What happens with negative numbers?

📝 Files


⬅️ Week 01 | 📖 Main | ➡️ Week 03