⚡ Quick Reference: All 3 Errors at a Glance
| Error # | Line(s) | Error Type | Problem | Fix |
|---|---|---|---|---|
| 1 | Line 5 | Syntax Error | Missing def keyword |
Add def before come_down(): |
| 2 | Line 6 | Name Error | Function not defined | Must define turn_around() function |
| 3 | Lines 13, 16 | Name Error | Function misspelled | Change buildtower() to build_tower() |
def Keyword
Why it's wrong: Python requires the def keyword to define a function. Without it, Python doesn't recognize this as a function definition.
What students should explain: "The function definition is missing the def keyword. Python needs def to know we're creating a function."
Why it's wrong: The turn_around() function is called but never defined in the starter code. Python cannot execute a function that hasn't been defined.
⚠️ Teaching Note: This is the trickiest error! Students must realize they need to CREATE a missing function, not just fix existing code.
Why it's wrong: The function is defined as build_tower() (with underscore) but called as buildtower(). Python is case-sensitive and treats these as different names.
⚠️ Common Mistake: Many students will fix line 13 but forget line 16. Remind them: "How many times is build_tower() called?"
✅ Quick Grading Checklist
Full Credit (All errors found):
Partial Credit:
Needs Review:
⏱️ Time Management for 6-Minute Check
- Minutes 1-2: Quick scan - did they find all 3 error locations?
- Minutes 3-4: Check error type classification
- Minute 5: Verify they CREATED
turn_around()function - Minute 6: Provide quick feedback and stamp/initial
💡 Teaching Tips & Common Mistakes
🎯 For Error #1
- "What keyword does Python need to define a function?"
- "What's missing from this line?"
- Watch for: Students adding
defin wrong place
🎯 For Error #2
- "Does this function exist anywhere in the code?"
- "What would Karel need to do to turn around?"
- Watch for: Students marking it but not writing the solution
🎯 For Error #3
- "How is the function name spelled when it's defined vs. called?"
- "Are there any other places this function is called?"
- Watch for: Only fixing one instance
📊 Expected Performance
- Strong: Finds all 3 errors in 3-4 minutes
- Developing: Finds 2 errors, needs prompting
- Needs Support: Finds only Error #3
🌟 Extension for Early Finishers
- "Why do you think the
turn_around()function is missing?" - "Could you create a
turn_right()function a different way?" - "What would happen if you only fixed line 13 but not line 16?"
✨ Complete Solution Code
Total Errors: 3 errors (but Error #3 appears twice, so 4 corrections needed)
📝 Summary of All Changes
- Added:
def turn_around():function (completely missing) - Fixed: Added
defkeyword tocome_down():function - Fixed: Changed
buildtower()tobuild_tower()on line 13 - Fixed: Changed
buildtower()tobuild_tower()on line 16