2.1.20

Logic Errors

Test yourself

Logic Errors

Logic errors are hard to detect because the translator will not detect them for us.

Illustrative background for Logic errorsIllustrative background for Logic errors ?? "content

Logic errors

  • Logic errors are mistakes in the logic of the program.
  • Programs will run, but their outcome will not be as intended.
  • They are much more difficult to debug than syntax errors.
Illustrative background for Examples of logic errors:Illustrative background for Examples of logic errors: ?? "content

Examples of logic errors:

  • Many logic errors arise from the use of the wrong boolean operator, e.g. mixing up AND and OR.
  • Many logic errors arise from putting menu options the wrong way around in a selection statement.

Jump to other topics

1Computational Thinking & Algorithms

2Programming

3Hardware & Software

4Data

5The Internet

6Online Safety & Security

Go student ad image

Unlock your full potential with GoStudent tutoring

  • Affordable 1:1 tutoring from the comfort of your home

  • Tutors are matched to your specific learning needs

  • 30+ school subjects covered

Book a free trial lesson