Lesson 7.8: Project Checkpoint & Debugging

Today’s Goals

  • Review project progress so far
  • Strengthen debugging skills
  • Make improvements based on feedback

Warm-Up Question

  • What is the most confusing bug you’ve faced in your project so far?

Debugging Review

  • Common problems:
    • Infinite loops
    • Input errors (case sensitivity, wrong types)
    • Functions not being called
    • Variables not defined
  • Strategies:
    • Use print() to trace values
    • Test one function at a time
    • Read error messages carefully

Example Debugging

def greet(name):
    print("Hello", Name)  # ❌ typo: Name instead of name

greet("Alice")

Error: NameError: name 'Name' is not defined

Fix:

def greet(name):
    print("Hello", name)  # ✅ corrected variable

greet("Alice")

Class Activity

  • Run your project
  • Identify at least one bug or improvement needed
  • Fix it and test again

Teacher Checkpoints

  • Show your project progress by halfway through class
  • Teacher/peer gives one suggestion for improvement

Student Challenge

  • Write down the 2 hardest bugs you’ve fixed so far and how you solved them

Wrap-Up

  • Debugging is where your program really takes shape
  • Next time: Peer review & feedback session