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

Clear instructions

Week 1 · Unit 1: Be a game developer · 3 lessons
1

Exact steps

Computing 2: Unit 1, pp. 8–23
GoalSay what an algorithm is and tell a precise set of steps from a vague one.
New words
algorithm · a set of exact steps for doing a taskprecise · exact, clear and correctstep · one small instruction
Explanation

An algorithm is a set of steps that tells someone how to do a task. The steps must be precise. Precise means exact and clear. “Put on your shoe” is not very exact. “Put your left shoe on your left foot” is better. A computer cannot guess what you mean, so a good algorithm leaves nothing to guess.

Not precisePrecise
Draw a faceDraw a big circle
Add some seedsAdd 3 seeds
WaitWait for 2 minutes
Worked examples
StepAlgorithm AAlgorithm B
1Get waterFill a cup with water
2Pour itPour it on the soil of the plant
Two algorithms for watering a plant. Algorithm B is more precise. It says what to fill and where to pour.
2start ongreen flaghopend
“Hop” is not precise. “Hop 2 times” is precise, because it says how many. This block says it with a number.
“Walk to the door” is not very precise. “Walk 5 steps forward” is better, because a robot knows exactly how far to go.
Class activity

Back-to-back drawing (two players): sit back to back, each with paper and a pencil. Player A draws three shapes, such as a big square, a small circle and a triangle, and does not show them. Player A gives instructions, for example “Draw a big square in the middle of the page.” Player B draws only what is said and may not ask questions. Then compare the two pictures. Swap places. Which instructions were precise, and which made a difference?

Practice
1
Which instruction is more precise: A “Stir the soup” or B “Stir the soup 5 times”?
2
Look at the two algorithms for drawing a flag. Which one is more precise?
StepAlgorithm 1Algorithm 2
1Draw a shapeDraw a rectangle
2Colour itColour it red
3
A robot starts on the left and the tree is on the right. The algorithm is: start on the green flag, move right (?), stop. What number is missing?
4
Make this instruction precise: “Put some books on the shelf.”