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

Fixing mistakes

Week 9 · Unit 4: Be an animator · 3 lessons
3

Steps to finish a task

Computing 2: Unit 4, pp. 54–65
GoalBreak a task into steps, take out a step that is not needed and put the steps in order.
New words
task · a job to doextra step · a step that is not neededorder · which step comes first, next and last
Explanation

To write an algorithm for a task, we break the task into steps. First think about what must happen. Write down every step. Cross out any extra step that is not needed. Put the steps in the right order. Last, read the algorithm from the first step to the last, and check that it works. A task such as making a fruit salad needs only a few steps.

get the fruitwash itcut it upmix in a bowl
Worked examples
StepInstruction
1Get the fruit
2Wash the fruit
3Cut the fruit
4Put the pieces in a bowl
5Mix
Fruit salad in order: 1 Get the fruit. 2 Wash the fruit. 3 Cut the fruit. 4 Put the pieces in a bowl. 5 Mix.
StepInstruction
1Get the fruit
2Paint a picture
3Wash the fruit
4Cut the fruit
One of these steps is extra, so we cross it out: Paint a picture. The other steps stay.
Some days need more steps. On a sports day, getting ready for school needs two extra steps: put on your trainers and pack a water bottle.
Class activity

Task cards: choose one task, such as getting ready for school. Write each step on a small card. Add one extra card that does not belong, for example “Ride a rocket”. Mix the cards. A friend takes out the extra card and puts the rest in order. Then follow the algorithm for real. Did it work? If not, find the bug and fix it.

Practice
1
Put the steps for feeding a dog in the right order: A Put the bowl down for the dog. B Fill the bowl with dog food. C Get the dog’s bowl. D Call the dog.
A put the bowl downB fill with foodC get the bowlD call the dog
2
Which step is not needed when planting a seed?
StepInstruction
1Dig a hole
2Put the seed in the hole
3Ride a bike
4Cover the seed with soil
5Water it
3
Write four steps for making a glass of squash.
4
What steps would you add to getting ready for school on a swimming day?