Skip to content

Latest commit

 

History

History
87 lines (65 loc) · 2.27 KB

File metadata and controls

87 lines (65 loc) · 2.27 KB

Week 06: Functions - Game Pack (MILESTONE)

📚 Learning Objectives

  • Define and call custom functions
  • Use parameters to make functions flexible
  • Return values from functions
  • Organize code into reusable pieces
  • Complete Phase 1 assessment

🔗 Required Prior Knowledge

  • Week 5: For loops
  • Week 4: If statements
  • Week 3: Input and random numbers
  • Week 2: Variables

⏱️ Lesson Flow (60-75 minutes)

Time Activity Description
0-10 min Phase 1 Review Quick recap of Weeks 1-5
10-25 min New Concept: Functions def keyword, parameters, return
25-45 min Build Game Pack Roll dice, flip coin, guess number
45-60 min Milestone Project Custom game using all concepts
60-75 min Assessment Week 6 Rubric

🎯 Success Criteria (Milestone)

  • Student can define and call functions
  • Student uses parameters correctly
  • Student returns values from functions
  • Milestone: Completes assessment project independently

⚠️ Common Student Errors

  1. Forgetting to call function

    def greet():
        print("Hi")
    # Function defined but never runs!
    # Fix: Add greet() call
  2. Wrong indentation

    def greet():
    print("Hi")  # IndentationError
  3. Using variable outside function scope

    def test():
        x = 5
    print(x)  # NameError

📊 Phase 1 Assessment

See Week 6 Milestone Rubric

Project Options:

  • Multi-game menu system
  • Quiz game with scoring
  • Story game with multiple endings
  • Custom dice roller with stats

🏠 Extension Project

Create "Ultimate Game Pack" with 5+ mini-games:

  • Dice roller
  • Coin flipper
  • Number guesser
  • Random name generator
  • Rock-paper-scissors

📝 Files


⬅️ Week 05 | 📖 Main | ➡️ Phase 2: Turtle Graphics

🎉 Congratulations on completing Phase 1: Python Foundations!