3
Fix it and check it
Computing 1: Topic 1.1, pp. 9–18
GoalFix an error in an algorithm and check that it works. Say where algorithms help at school.
New words
fix · change something so that it is rightschool routine · steps we follow at school
Explanation
To fix an error, move the step or add the missing step. Then check again. Say the new steps in order. If it works, the error is fixed. We use algorithms at school too, for example to line up or to tidy the classroom.
Worked examples
Tidy-up algorithm: 1 Stop playing. 2 Put the toys in the box. 3 Put the box on the shelf. We check each step. It works!
Lining up: 1 Stand up. 2 Push your chair in. 3 Walk to the door. 4 Stand in line. A child forgot step 2. The chair is in the way. Add step 2 and it works.
Taking turns at the slide: 1 Wait at the bottom of the ladder. 2 Climb up. 3 Slide down. 4 Go to the back of the line. An algorithm can help everyone to be fair and safe.
Class activity
Fix my algorithm: draw an algorithm with four pictures for a job at school, such as washing paint brushes. Leave out one picture. Ask a friend to find the missing step and draw it. Then follow the whole algorithm together to check.
Practice
1
Zara walks to the bus. Then she puts on her coat. But it is cold outside! How can she fix the order?
Put on the coat first. Then walk to the bus.
2
After you fix an error, what must you do?
Check again that the algorithm works.
3
Name one algorithm we use at school.
For example: lining up, tidying up, taking turns, packing up at the end of the day.
4
Kenji’s steps to draw a sun: 1 Draw a circle. 2 Draw lines. 3 Colour it yellow. Is there an error?
No. The steps work in this order.