AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Spot the error

Week 2 · 1.1 Algorithms all around us · 3 lessons
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.

error!find itfix it
Worked examples
1 zip up✗2 put in apple3 open✗
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.
1 pour?2 drink
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.
spot itfixed!
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?
2
Mia’s steps: 1 Draw a flower. 2 Get a pencil. What kind of error is it?
1 draw a flower2 get a pencil
3
Leo’s steps for feeding his fish: 1 Open the lid. 2 Put the lid back. Which step is missing?
fish
4
Name the two kinds of error you learnt today.