AQA · GCSE · Computer Science
Course version: 8525 · Version from Sept 2020
Be able to identify and categorise errors within algorithms and programs.
Full specification wording
Robust and secure programming: Be able to identify and categorise errors within algorithms and programs.
This criterion asks you to do two things with a given algorithm or program: find the error, then label it as a syntax error or a logic error.
Checked against the AQA 8525 specification (opens in a new tab) on .
- Point 14 of 14
Study notes
From the checked teaching notes for this specification point.
The idea
This criterion asks you to do two things with a given algorithm or program: find the error, then label it as a syntax error or a logic error. Work methodically. First check the language rules — missing colons, unbalanced brackets, misspelled keywords or unclosed string literals are syntax errors, and the code will not translate. If the code is valid, trace it with sample data, writing down variable values line by line, and compare the output with what the specification of the task requires. A mismatch, such as a loop that runs one time too many or a comparison using the wrong operator, is a logic error. State the category and give the evidence from the code that supports it.
What earns the marks
- Locates the specific line or construct in the algorithm or program that causes the error.
- Categorises the error as a syntax error when the code breaks the language rules and cannot be translated.
- Categorises the error as a logic error when valid code runs but produces an incorrect result.
- Supports the category with evidence, such as the offending token for a syntax error or a trace showing wrong output for a logic error.
- Suggests a correction that removes the error while keeping the intended behaviour.
Common mistakes and how to put them right
Guessing the category from the symptom alone without checking the code.
Put it right: Inspect the construct and decide whether translation would fail or whether the code runs but gives wrong output.
Labelling an off-by-one loop as a syntax error.
Put it right: The loop is valid code that runs the wrong number of times, so it is a logic error.
Describing the error vaguely without naming the line or construct.
Put it right: Point to the exact token or statement and explain why it is wrong.
Exam tips
- Trace the code with a small table of variable values to expose logic errors.
- Check brackets, colons, quotes and keyword spelling first when looking for syntax errors.
- Always state the category and then justify it with evidence from the code.
Try the lesson
The start of the Robust and secure programming: Be able to identify and categorise errors within algorithms and programs. lesson, made from checked teaching notes for this specification point.
Have a go first
A program line reads: print("Hello" . Which category of error is present, and what happens when the program is translated?
There is more to this lesson
The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge
Test your understanding of Robust and secure programming: Be able to identify and categorise errors within algorithms and programs.
Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge