Standard Algorithms

Standard algorithms are patterns/templates that we re-use in different situations. Using the standard algorithm saves time because we already know that it works, and you don’t have to work out a solution yourself, from scratch. For National 5, you need to know how to apply three standard algorithms:

  1. Traversing an array
  2. Running total in a loop
  3. Input validation

You need to learn the patterns, and apply them to different situations.

Task 1 (Traversing an Array)

A program has an array of 5 temperatures. It should show each temperature using the loop. Looking at your notes, put the blocks in order to complete this program.

Reset Get feedback

Next task