Revise Computing
Revision notesQuestionsFor schools
Log inStart revising free
Revision notesQuestionsFor schoolsLog in
GCSE Computer Science/Supplementary programming practice/IDE Skills

Error messages

301.18 IDE Skills

Practise exam questions

IDE Skills — Note 2 of 4

Understand what went wrong.

What you need to know

Python error messages tell you the type of error (e.g. SyntaxError, NameError) and the line number. Reading them carefully is the fastest way to find and fix bugs.

What to know

  • SyntaxError: typo or missing character (colon, bracket)
  • NameError: variable not defined or misspelled
  • TypeError: wrong type used in operation
  • The line number in the error points to where it happened
  • Read from the bottom of the traceback up

Code examples

Reading error messages
python
# SyntaxError: Missing colon
# if x > 5
#          ^
# SyntaxError: expected ':'

# Fix:
if x > 5:
    print("big")
← Previous noteEditor usage301.18 IDE SkillsNext note →Running code301.18 IDE Skills

Back to IDE Skills

Specification notes for programming are in Paper 2.

IDE Skills

Note 2 of 4

  1. 1Editor usage
  2. 2Error messages
  3. 3Running code
  4. 4Debugging tools
Topic overview

© 2026 Revise Computing · revisecomputing.co.uk

Privacy noticeTermsContact

Revise Computing is an independent revision resource. It is not affiliated with, or endorsed by, OCR (Oxford Cambridge and RSA Examinations).