8.1.2

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

1Components of a Computer

2Software & Software Development

3Exchanging Data

4Data Types, Data Structures & Algorithms

5Legal, Moral, Cultural & Ethical Issues

6Elements of Computational Thinking

6.1Thinking Abstractly

6.2Thinking Ahead

6.3Thinking Procedurally

6.4Thinking Logically

6.5Thinking Concurrently

7Problem Solving & Programming

8Algorithms

Unlock your full potential with Seneca Premium

  • Unlimited access to 10,000+ open-ended exam questions

  • Mini-mock exams based on your study history

  • Unlock 800+ premium courses & e-books

Get started with Seneca Premium