← Years 5–6 Creating Digital Solutions

Following an algorithm step by step

To carry out each step exactly as written, in order, without skipping steps or guessing. You can track values on paper, check the final result, or act it out with a partner.

Understanding Following an algorithm step by step in Years 5–6 Creating Digital Solutions

What it does: An algorithm only works when each step is carried out in the order it is written. Checking the final result is part of following an algorithm, so you can see if you did every step correctly. Score starts at 0. Step 2 makes it 2 and step 3 makes it 4. Writing each value on paper helps you keep track. Algorithms are followed in order, starting at step 1. Changing the order can give a different result.

Common mistakes: The algorithm only made a variable called total. Step 3 must add to total, not to score, which was never set up. It should be ADD 3 TO total. Starting at 3 and adding 1 twice gives 5, but the last line says 4. The start must be count = 2 so the steps give the right result.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 11–20) and word search (Modules 1–20).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Your algorithm says: 1. Start with 5. 2. Add 3. 3. Double the answer. What do you do first?
Start with 5, then add 3, then double itDouble the answer first because it is the biggest step
Matches
Skipping Step 2 because it looks boring, then doing Step 3
↓
Skipping a step. Every step must be carried out in order, even if it seems unimportant.
Applying
Meanings
Term
follow an algorithm
Meaning
To carry out each step exactly as written, in order, without skipping steps or guessing. You can track values on paper, check the final result, or act it out with a partner.
Practice
1. Write down: total = 0
Testing
Gaps
SHOW
Check Answer
Spots
2ADD 5 TO total
3ADD 3 TO score

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Armadillo' badge — Shield Bearer, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Your algorithm says: 1. Start with 5. 2. Add 3. 3. Double the answer. What do you do first?
A. Start with 5, then add 3, then double it ✓
B. Double the answer first because it is the biggest step
Follow every step exactly as written and in order. Step 1 comes first, then step 2, then step 3. The answer is 16.
2. Which is the best way to follow an algorithm?
A. Skip steps that look easy
B. Do each step exactly as written ✓
Skipping steps can change the result. A computer follows every step, so you need to as well.
3. An algorithm says: 1. Set score to 0. 2. Add 2 to score. 3. Add 2 to score. What is score at the end?
A. 4 ✓
B. 2
Score starts at 0. Step 2 makes it 2 and step 3 makes it 4. Writing each value on paper helps you keep track.
4. Why do we write down each value on paper as we follow an algorithm?
A. To guess what the answer will be before we start
B. To keep track of how the values change at each step ✓
Tracking values on paper means you do not have to guess or remember. You can see exactly what happened at each step.
5. A step says: 'Take 2 steps forward.' You are not sure what it means, so what should you do?
A. Take exactly 2 steps forward as it says ✓
B. Take 3 steps forward because it seems better
Following an algorithm means doing exactly what is written. If a step is wrong, you fix the algorithm later. You do not change it while following it.

Match the Pairs

Step 1: SET total TO 0 → Start by giving a value to track. Write total = 0 on paper before moving to Step 2.
Step 3: ADD 5 to total (total was 2) → Do exactly what the step says: 2 + 5 = 7, so write down that total is now 7.
Follow the steps in order, one at a time, and never skip ahead → Step 1, then Step 2, then Step 3, then Step 4
After the last step, check that your final result is correct → Final answer: total = 7. Does it match the goal?
Skipping Step 2 because it looks boring, then doing Step 3 → Skipping a step. Every step must be carried out in order, even if it seems unimportant.
Step: ADD 4 to score. Partner guesses the answer without working out score → Guessing instead of working it out. The partner should act out the step and say the real new value of score.

Key Term

follow an algorithm
To carry out each step exactly as written, in order, without skipping steps or guessing. You can track values on paper, check the final result, or act it out with a partner.

Fill in the Blanks

1. SET count ← 2 ADD 3 to count SHOW count
Hint: Type the variable name whose final value the last step displays.
2. SET score ← 5 ADD 4 to score // score is now 9
Hint: Track the value on paper: type the number score holds after the ADD step.
3. SET x ← 10 SUBTRACT 3 from x // check: x should be 7
Hint: Check the final result: type the number x ends up as after following the steps.
4. SET steps ← 0 REPEAT 3 TIMES: ADD 4 to steps // steps is now 12
Hint: Follow each repeat in order and type the final value of steps.
5. SET total ← 1 ADD 2 to total // check: total is 3
Hint: Type the command word that makes the final result match the check.

Spot the Error

Question 1
A SET total TO 0
B ADD 5 TO total
C ADD 3 TO score
D SHOW total
Line C — The algorithm only made a variable called total. Step 3 must add to total, not to score, which was never set up. It should be ADD 3 TO total.
Question 2
A START with count = 3
B ADD 1 to count
C ADD 1 to count
D count is now 4
Line A — Starting at 3 and adding 1 twice gives 5, but the last line says 4. The start must be count = 2 so the steps give the right result.
Question 3
A SET a TO 4
B SET b TO 6
C SET c TO a + b
D SHOW a (answer 10)
Line D — The answer 10 is stored in c (4 + 6). Showing a would print 4. The last step should be SHOW c.
Question 4
A 1. Write down start: 10
B 2. Subtract 3: write 6
C 3. Subtract 2: write 5
D 4. Check the last number: 5
Line B — 10 minus 3 is 7, not 6. When tracking values on paper you must work out each step exactly. It should say write 7.
Question 5
A Partner reads step 1 aloud
B You do step 1 exactly
C Partner reads step 4 aloud
D You do step 2 exactly
Line C — Steps must be done in order without skipping. After step 1 comes step 2. The line should be Partner reads step 2 aloud.

Student with a class code? Join your class →