GoalSee that recipes, directions and daily routines are algorithms, and write my own.
New words
recipe · steps for making fooddirections · steps that tell you how to get to a placeroutine · something you do the same way every dayinstruction · a sentence that tells you what to do
Explanation
Many things you do every day are algorithms. A recipe is an algorithm: it tells you what to do first, next and last. Directions are an algorithm too: “go straight, turn right, go straight again”. Tidying your room is an algorithm: pick up the toys, put the books on the shelf, make the bed. Even a maths problem has steps: if a box holds 12 pencils and 4 are taken and then 3 more, first 12 − 4 = 8, then 8 − 3 = 5. Computers and apps follow algorithms too, so a clear list of steps is a clever way to solve many problems.
Worked examples
An algorithm for tidying a room: pick up the toys, put the books on the shelf, make the bed.
Youssef gives directions to the library on a grid: go forward 1 square, turn left, then go forward 2 squares.
Step
Calculation
1
12 − 4 = 8
2
8 − 3 = 5
Answer
5 pencils are left
A maths algorithm: a box has 12 pencils; 4 are taken and then 3. How many are left?
Class activity
My routine algorithm. Choose something you do every day, such as getting ready for school, feeding a pet or packing your bag. Write the steps, numbered, on paper. Swap with a partner: can they follow your steps exactly? Did you miss a step?
Practice
1
Name three things in daily life that are algorithms.
For example a recipe, directions, tidying a room, or solving a maths problem.
2
The robot starts at the bottom square facing up. It follows: forward 2, turn right, forward 1. Where does it stop? Say the letter.
B, because it goes up two squares, then turns right and moves one square.
3
A box has 15 pencils; 5 are taken and then 4. Write the steps and the answer.
15 − 5 = 10, then 10 − 4 = 6. There are 6 pencils left.
4
Write an algorithm of three steps for filling a water bottle.
Answers differ, for example: open the lid, fill the bottle at the tap, close the lid.