Logic error
What Logic error means in Computer Science GCSE, as defined for OCR, Pearson Edexcel.
Definitions of Logic error
Exam boards and our study guides word this term in slightly different ways. Learn the version your board uses.
Check what you remember
Read the wording for your board, then hide it and explain Logic error in your own words. Rough notes are fine. This is a self-check, with no mark or grade.
Reference: Pearson Edexcel
Code is syntactically valid and runs, but produces an incorrect result because the algorithm's steps or conditions are wrong.
An error where the program runs but gives wrong output, such as using < instead of > or adding instead of subtracting.
Grammatically valid code that produces the wrong result, and is harder to find because the program runs.
Topics that use Logic error
- Designing, creating and refining algorithms (OCR GCSE)
- Testing (OCR GCSE)
- Algorithms (Pearson Edexcel GCSE)
Related terms
- Syntax error
- Runtime error
- Arithmetic operators
- Binary search
- Bubble sort
- Correcting
- Creating
- Decomposition
Using Logic error in the exam
Check the command word and mark scheme for your exact question. After comparing your explanation with the reference, use the term in an answer on the linked topic. This practice does not predict an exam mark.
Practise Computer Science questions
Create a free account to answer exam-style questions on this topic and get feedback on your answers.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge