GCSE Computer Science (AQA)

Topic Summaries

ALGORITHMS AND PROGRAMMING: Testing programs

Types of errors

  • Syntax errors:
    • Break the rules of the language, meaning the program won’t run (e.g. misspelled keywords (‘pritn’ instead of ‘print’), missing punctuation, or incorrect indentation).
print(“Hello     # Syntax error
  • Logic errors:
    • Occur when the program runs but gives wrong results, caused by incorrect algorithm structure or flawed reasoning in the code (e.g. using >= instead of >, or an incorrect loop range).
    • These can be harder to find because there are no error messages

age = 10

if age > 18:

print(“Child”)     # Logic error

Unlock Types of errors

Sign up to unlock the rest of this topic — plus every other topic, video, flashcard set and eBook guide in your SnapRevise Digital subscription.

Cancel anytime — instant access the moment you sign up.