1
Mistakes are errors
Computing 1: Topic 1.1, pp. 9–18
GoalSay that a mistake in an algorithm is called an error, and name two kinds of error.
New words
error · a mistake in an algorithm or a programmissing · left out
Explanation
A mistake in an algorithm is called an error. One kind of error is a step in the wrong place. Another kind is a missing step. An error can stop the job from working. We must find the error and fix it.
Worked examples
Sara packs a picnic bag. Her steps: 1 Zip up the bag. 2 Put in an apple. 3 Open the bag. The steps are in the wrong order. You must open the bag first.
Ben wants a drink. His steps: 1 Pour the juice into the glass. 2 Drink it. A step is missing. He forgot to get a glass.
Everyone makes errors, even grown-ups and computers. The clever part is to spot the error and fix it.
Class activity
Error hunt: a grown-up says a short algorithm out loud and puts in one mistake on purpose, for example ‘Pour the juice. Get a glass. Drink.’ You clap when you hear the error. Say what is wrong. Then swap, and you make a mistake for them.
Practice
1
What do we call a mistake in an algorithm?
An error.
2
Mia’s steps: 1 Draw a flower. 2 Get a pencil. What kind of error is it?
The steps are in the wrong order. She must get a pencil first.
3
Leo’s steps for feeding his fish: 1 Open the lid. 2 Put the lid back. Which step is missing?
Putting the food in. Without it the fish gets no food.
4
Name the two kinds of error you learnt today.
A step in the wrong place, and a missing step.