2
Find the wrong step
Computing 1: Topic 1.1, pp. 9–18
GoalFind the one step that is in the wrong place in an algorithm.
New words
wrong place · in a spot where it does not belongcheck · look again to see if it is right
Explanation
To find an error, say the steps in order. Ask: does each step make sense here? Pretend to do the steps. Stop when something goes wrong. That is the step in the wrong place. Then say the steps in the right order.
Worked examples
Nodira makes a card. 1 Fold the paper. 2 Draw a picture on the front. 3 Give the card to a friend. 4 Write ‘Happy birthday’ inside. Step 3 is in the wrong place. Giving the card must be last.
Kenji waters a plant. 1 Fill the can. 2 Water the plant. 3 Carry the can to the plant. Step 3 should come before step 2. You cannot water the plant before the can is next to it.
Aisha reads a book. 1 Choose a book. 2 Open the book. 3 Read. 4 Close the book. We check each step. There is no error here!
Class activity
Cut-up steps: write four steps for making a paper boat or a drawing on four strips of paper. Swap one strip into the wrong place. Give the strips to a friend. They find the wrong step and put it back. Say the right order together.
Practice
1
Which step is in the wrong place? 1 Pick the apple. 2 Eat the apple. 3 Wash the apple.
Step 2, eating. It must move to the end: pick, wash, eat.
2
Steps: 1 Get a shopping bag. 2 Carry the bag home. 3 Put the shopping in the bag. Which step should move?
Step 2 should move to the end: get the bag, put the shopping in, then carry it home.
3
Why do we pretend to do the steps?
So we can see where something goes wrong.
4
Steps: 1 Walk to school. 2 Open the school door. 3 Say hello to the teacher. Is there an error?
No. The steps are in a good order.