301.18 IDE Skills
Practise exam questionsIDE Skills — Note 2 of 4
Understand what went wrong.
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.
SyntaxError: typo or missing character (colon, bracket)NameError: variable not defined or misspelledTypeError: wrong type used in operation# SyntaxError: Missing colon
# if x > 5
# ^
# SyntaxError: expected ':'
# Fix:
if x > 5:
print("big")Specification notes for programming are in Paper 2.