Recipe algorithms
Action Algorithms! - Lesson 2
Objectives
- To know what an algorithm is
- To write an algorithm for a recipe
- To understand and explain debugging
- To be able to debug an algorithm
Lesson 1 - Crazy Characters
Lesson 2 - Recipe Algorithms
Lesson 3 - Sharing Sweets
Lesson 4 - The Human Crane
Lesson 5 - Action Sequences
Lesson 6 - Programming Dance
Introduction
Recap the key terms of algorithm and debug from last week. This video on BBC Bitesize gives a really nice explanation appropriate for KS1
Remind them that an algorithm is a sequence of instructions to solve a problem or task. What was the task last week? How did they solve it? How did they write their algorithms down last week?
Recap that computers also work by following sequences of instructions and rules, and we can call writing those instructions programming. A program is an algorithm that a computer follows.
Can you think of any other examples in their lives where they have to follow a sequence of instructions to be able to complete a task correctly? Discuss the ideas they have and what the instructions look like in each case.
They may come up with:
- rules for games,
- building models like Lego
- recipes.
If a recipe is followed in the wrong order the food will not turn out very well. In this lesson we will be looking at the algorithms of recipes.
Take a look at the smoothie recipe in the teacher’s presentation. Is anything wrong with it?
Establish that is in the wrong order. Does this matter? Why?
Group work
Give each of your normal table groups a set of the smoothie recipe cards and ask them to see if they can reorder the cards to put the recipe in the correct order. Explain that this is an example of debugging the algorithm (looking for mistakes that stop it working, and fixing them). Take a look at the correct version and ask them how they decided on the correct order, did everyone agree?
Look at some examples of recipes below:
Are there any common words that are used? What sort of word does each sentence begin with? Bossy words are great as they make it clearer what the person should do!
Download and print out a different set of the recipe cards with instructions (from the the Food a fact of life site). Ask the children to work in small groups to put the cards in the correct order. Groups can swap their set of cards with another group when they have reordered the cards accurately.
If you have cameras or tablets available, each group could capture their correct version of the algorithm for each recipe.
Main task
Explain that they have two recipe algorithms they need to consider. The first task is making a bowl of cereal. For this recipe there are suggested instructions at the top of the sheet that the children can use if they want to. They need to re-write the recipe in the correct order and provide a simple picture for each step to help.
The second task is writing the algorithm for making toast with butter and jam.
Encourage the children to think of good bossy words to use first, think through the whole order of what needs to be done before they start. The sheet gives them space for six instructions but they could extend this if they wanted to add more detail. Again, they can use pictures to help explain their recipe.
Plenary
Bring children back to the carpet with their recipe algorithms. Ask children to show their carpet partner their algorithm for making toast and compare them, are they the same? Do they both work? Select a few children to offer their instructions for the process of making toast with butter and jam. Consider each one with the class, is it clear? Could we add any more detail? Would it work?