Logic errors: runs but gives the wrong answer
A mistake that lets the program run with no error message but gives a wrong result, such as using > instead of >=, the wrong operator, or steps in the wrong order.
Understanding Logic errors: runs but gives the wrong answer in ACARA Digital Technologies Years 7–8
What it does: >= includes the value 50, whereas > would leave it out and give the wrong result. === checks whether the values are equal. A single = would overwrite answer and cause a logic error. A logic error lets the program run but gives a wrong result. A syntax error stops the program with an error message. age > 13 wrongly leaves out 13-year-olds. It should be age >= 13 so that 13 is included. With score > 50, a score of 50 does not pass. Using >= fixes the boundary value. The code runs, but + gives the wrong answer. The area needs the * operator.
Common mistakes: The program runs, but > leaves out a score of exactly 50, so a student who should pass is told nothing. It should be >= to include 50. Adding gives 23 instead of the cost of 3 items. The total needs multiplication: price * qty gives 60. There is no error message, just a wrong answer.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 624–634) and word search (Modules 611–634).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
logic errorFill in the Blanks
Spot the Error
Student with a class code? Join your class →