Cover lesson · Design Technology · Year 8 · Intermediate

Algorithm for a recipe

DCF: Data and computational thinking → Problem-solving and modelling

Name: Class: Date:

Cover teacher — you need no subject knowledge

Print: this sheet, one per pupil, plus the stimulus sheet "Welsh cakes — picau ar y maen", one per pupil or one between two. No computers and no cooking. Nothing is heated and nothing is eaten — this is a lesson about breaking a process into steps, and the recipe is only the raw material.

Run: 5 min — read the recipe · 8 min — Part A, sort it into inputs, processes and outputs · 12 min — Part B, write the numbered algorithm · 17 min — Part C, draw the flowchart in the frame, using the four shapes shown · 5 min — Part D, the two trick questions · 3 min — swap and try to follow a partner's algorithm exactly as written, which is where the gaps show up.

Collect: this sheet. The flowchart is the part the class teacher will mark.

What you are doing

A recipe written in sentences is not an algorithm. An algorithm is a set of steps so clear that somebody who has never made the thing can follow them without guessing. You are going to turn the Welsh cakes recipe into one: inputs and outputs identified, steps numbered, and then a flowchart with a real decision in it.

The four flowchart shapes

An arrow that goes back up to an earlier step is a loop: it repeats work until a condition is met.

Step by step

  1. 5 min — Read the recipe right through before writing anything. Underline every instruction verb.
  2. 8 min — Part A: sort the recipe into inputs, processes and outputs.
  3. 12 min — Part B: write the numbered algorithm. One instruction per line, no sentences with "and then" in them.
  4. 17 min — Part C: draw the flowchart. You need at least two decisions and at least one loop.
  5. 5 min — Part D: the two trick questions.
  6. 3 min — Swap. Follow your partner's algorithm word for word and tell them the first place you had to guess.

Part A — Inputs, processes, outputs

Inputs (what goes in) Processes (what is done) Outputs (what comes out)

The equipment is neither an input nor a process. What would you call it, and why does an algorithm still have to mention it?

Part B — The numbered algorithm

One instruction per line. Use amounts and times from the recipe — "a bit of flour" is not an instruction. Mark any step that repeats with the word REPEAT and any question with IF.

Part C — The flowchart

Draw it in the frame. Start at the top with a terminator, use a parallelogram for the ingredients going in and the cakes coming out, rectangles for the things you do, and diamonds for the two questions. Label every arrow out of a diamond Yes or No, and draw at least one arrow that loops back to an earlier step.

Part D — Two trick questions

The recipe says: add milk a tablespoon at a time, mix, and stop as soon as the dough comes together. Why can that not be written as a single process box?
Your flowchart cooks the first side, checks it, then turns the cake over. What would go wrong if you drew the "Is it golden brown?" decision before the "Cook for 2 minutes" box instead of after it?

Success criteria

If you finish early