1.2.6

Correcting Algorithms

Test yourself

Correcting Algorithms

As well as knowing what an algorithm does, it's important to be able to fix it if it all goes wrong.

Illustrative background for Incorrect identifiersIllustrative background for Incorrect identifiers ?? "content

Incorrect identifiers

  • A common mistake in programs is incorrect identifiers.
  • Be very careful with uppercase and lowercase letters.
  • Be careful with similar looking characters:
    • 0 and O.
    • 1 and l (lower case L).
Illustrative background for Incorrect operatorsIllustrative background for Incorrect operators ?? "content

Incorrect operators

  • Look out for the difference between similar operators such as testing if a number is less than another, rather than less than or equal to the other.
Illustrative background for Missing processesIllustrative background for Missing processes ?? "content

Missing processes

  • Sometimes a line of code has been forgotten, which can lead to issues such as infinite loops, where the code will never end.

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