Practice question · Sort into groups
Sort these errors by category.
Groups: Syntax Error · Logic Error · Runtime Error
- Infinite loop due to wrong update
- Forgetting a closing parenthesis
- Using < instead of <=
- Accessing index beyond list length
- Misspelling a keyword
Hints
- Ask whether the program refuses to start, crashes, or quietly misbehaves.
- A silently wrong result belongs in its own category.
Show the answer
Syntax Error: Forgetting a closing parenthesis, Misspelling a keyword
Logic Error: Using < instead of <=, Infinite loop due to wrong update
Runtime Error: Accessing index beyond list length
Why
Identifying the error category guides the debugging strategy.
Practise Debugging and validation
The app has 9 more questions on this lesson, and keeps your place in the course. Physics I is free to start.
More questions on Debugging and validation
- Your projectile simulation says a thrown ball climbs forever. Which debugging move gives the most information…
- A program runs without errors and produces plausible numbers that are wrong. Why is this harder to catch than…
- Order the steps of a systematic debugging process.
- Order these steps into the scientific debugging method.
- Complete the description of debugging.