Cause: Missing colon, quote, or parenthesis Fix: Check line mentioned in error for:
- Colons after if/while/for/def
- Matching quotes ("text" not "text)
- Matching parentheses
Cause: Using variable before creating it
Fix: Define variable before using: x = 0
Cause: Wrong spaces/tabs Fix: Use Thonny's auto-indent (Tab key)
Cause: No output or waiting for input Fix: Add print() statements or check for input() calls
Fix: Install in Thonny: Tools → Manage Packages → pgzero
Fix: Make sure you have draw() function defined
Fix: Don't run as regular Python - use pgzrun or add import pgzrun; pgzrun.go()
Fix: Try different USB cable (some are charge-only)
Fix: Check for MicroPython errors, reset micro:bit (button on back)
Fix: Use button_a.was_pressed() not is_pressed()
- Read error messages carefully - they tell you what's wrong!
- Check line numbers in errors
- Use print() to debug ("DEBUG: x =", x)
- Save often (Ctrl+S / Cmd+S)
- Ask for help - show the error message!