Mini Minds Hub · Free printable

Sandwich Algorithm Strips: Free Printable Worksheet for Year 5

In short: Free printable Sandwich Algorithm Strips for Year 5 (ages 9 to 10). Cut out strips A to F, stick them in order, then debug and predict.

  • ForYear 5
  • StageKey Stage 2
  • CostFree
  • FormatPrintable PDF

Sandwich Algorithm Strips is a Computing activity for Year 5 (ages 9 to 10). Children cut out six strips, A to F, stick them in order, then debug and predict what loops and if steps do.

Before anyone sticks anything down, ask the child to read their order aloud and act out each step with empty hands, as a robot would. The usual slip is to fill in a step the robot was never told. When a step cannot happen yet, that is the strip to look at again.

What is on the sheet

Children start with six strips labelled A to F. They cut them out, test the order aloud and stick them into the boxes. Then they complete a table, answer numbered questions and use the lines to write down their thinking. The tasks ask children to debug an algorithm and to predict what its loops and if steps will do. One strip repeats a step and another depends on a condition, so children need to read each strip closely.

  • A: Press the slices together, jam inside.
  • B: Repeat 2 times: butter one slice.
  • C: First, wash your hands.
  • D: If the lid is on, take it off. Then spread jam on a buttered slice.
  • E: Put two slices of bread on a plate.
  • F: Cut the sandwich in half.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

Debugging a different algorithm

A robot is given these steps for getting ready to go outside. 1. Tie the laces. 2. Put the shoes on your feet. 3. Pick up the shoes. Which step order has a bug, and how do you fix it?

This is a different task from the sheet. It shows two ways to find a bug.

Method 1: read it as a robot
  1. Do step 1 exactly as written. Tie the laces. There are no shoes in your hands yet.
  2. The robot is stuck, so the bug is at step 1.
  3. Move steps around until every step can happen when its turn comes.
Method 2: ask what each step needs first
  1. Tying laces needs shoes that are already on feet.
  2. Putting shoes on feet needs shoes that have been picked up.
  3. Order the steps by what each one needs, starting with the step that needs nothing.
Pick up the shoes, put the shoes on your feet, then tie the laces.

Testing an algorithm like a computer

Read it exactly

A computer does what the steps say and nothing else. Read each strip aloud in the order chosen and do not add any steps in your head.

Mark the first step that fails

If a step cannot happen yet, put a pencil dot beside it. The bug is usually at that step or just before it.

Change one thing at a time

Move one strip, then test the whole order again from the start. Changing several strips at once makes it hard to see what fixed the problem.

Say what a repeat or if step does

Before writing a prediction, say aloud what the step repeats, or what must be true for the step to happen.

What is an algorithm?

An algorithm is a set of clear steps that completes a task. A recipe, a set of directions or the rules of a board game are all algorithms. For a computer, the steps must be exact and in the right order. A person can fill in a missing step without noticing. A computer cannot. That is why a sandwich makes a useful example for children.

A mistake in an algorithm is called a bug, and finding and fixing it is called debugging. Two ideas help algorithms do more. A loop repeats steps without writing them out again. An if step makes a choice, so a step happens only when something is true. Children meet all of these ideas here, using a task they already know.

The sheet is done on paper with scissors and glue. If your child goes on to make a real sandwich, an adult does the cutting with the knife and any other dangerous part.

Quick facts about algorithms

  • A recipe is an algorithm, because it gives steps to follow in order.
  • A computer follows instructions exactly as they are written.
  • A mistake in a set of instructions is called a bug.
  • Fixing a bug is called debugging.
  • A loop lets a computer repeat steps without writing them out again.

Skills and curriculum link

  • Sequencing steps
  • Debugging errors
  • Predicting loops
  • Reading if steps
  • Logical reasoning

Ideas to help you guide the thinking

  • Read like a robotAsk the child to follow each strip exactly and to act it out. Listen for the point where the robot would be stuck.
  • Ask what comes firstFor any strip, ask what must already be true before the step can happen. The answer helps with ordering.
  • Name the repeated stepFor a loop, ask the child to point to the step that repeats and say it aloud once for each repeat.
  • Check the conditionFor an if step, ask what has to be true for it to happen. Then ask what the robot does when it is not true.

Key words

  • AlgorithmA set of clear steps, in order, that completes a task.
  • SequenceThe order that steps are done in.
  • BugA mistake in a set of instructions.
  • DebugFind a bug and fix it.
  • LoopA part of an algorithm that repeats one or more steps.
  • If stepA step that only happens when something is true.

How to use it

  1. Print both pages. Page 1 is for the child. Keep page 2, which has the notes and answers.
  2. Cut out strips A to F. Lay them on the table and read each one aloud before choosing an order.
  3. Test the order aloud as a robot would, doing each step with empty hands. Change it if a step cannot happen yet.
  4. Stick the strips into the boxes. Then fill in the table and answer the numbered questions, writing on the lines.
  5. Check with page 2 together. Ask the child how they decided on each step, then come back to any that need another look.

Help, stretch and game ideas

If it feels too hard

Ask the child to read each strip aloud as a robot would, and listen for the step that cannot happen yet. Start with the strip that needs nothing else to be done first. Place it, then ask what could come next.

To stretch confident children

Try question 8. It asks children to use the new loop and then work out how many slices are left from a loaf. Ask them to say aloud what the loop repeats before they start any counting.

Make it a game

Swap sheets with a partner before sticking. Follow each other's order exactly, like a robot, doing every step with empty hands. If a step cannot happen, say so and swap back. The partner then fixes the bug.

Mistakes to watch for

Watch forA child adds a step in their head that the strip does not say, so the order seems to work.

Try thisAsk them to do only what is written, with nothing assumed. Listen for the point where the robot would have to guess.

Watch forA child reads a loop as happening once.

Try thisUnderline the repeated step. Take a different example, such as Repeat 3 times: clap once. Clap aloud three times, then return to the sheet.

Watch forA child treats an if step as if it always happens.

Try thisAsk whether the condition is true right now. If it is not, ask what the robot does next, then read on.

Talk about it

  • Which strip did you place first, and what made you sure about it?
  • What would a robot do if a step were missing?
  • Where did you find a bug, and how did you fix it?
  • What does a loop save you from writing?
  • What does an if step ask the robot to check?
  • What other everyday jobs could we write as an algorithm?

Take it off the page

Human robot

One person gives spoken instructions for crossing a room. The other follows them exactly. Change any instruction that sends the robot to the wrong place.

Write a morning routine

Write the steps for getting ready for school. Add one loop and one if step, for example if it is raining. Swap with someone and test it.

Floor arrows

Mark a start and a finish with paper. Write a path as arrows on cards. A partner follows the arrows and debugs any card that goes wrong.

Who it is for

Parents

Sit beside your child for the first go and let them lead. Read the strips aloud together and act them out. Keep page 2 for yourself, and use it to check answers and find help ideas.

Teachers

Use it as a starter, a plenary or a table activity after teaching algorithms. It needs only scissors, glue and a pencil. Page 2 gives support, stretch and answers, which helps with mixed groups.

Home educators

Print it as part of a wider Computing plan. It pairs well with writing everyday routines as algorithms. The same sheet can be printed again for brothers and sisters, or for another go a few weeks later.

Where this skill fits

Before this, children meet algorithms as precise, unambiguous instructions, and create and debug very short programs. Ordering everyday steps, such as getting dressed, is a common start.

Next, children can write and debug longer programs that use sequence, selection and repetition. They also use logical reasoning to explain how an algorithm works. The loops and if steps here are the same ideas, met in a task they can picture.

Keep practising

If this sheet went well, find more in our Year 5 computing worksheets guide, or try Robot Maze Debugging, Plan a Chelsea Virtual Tour, Spelling Rule Treasure Map or Fairy Tale Flowchart Fix next.

Questions parents and teachers ask

What age is Sandwich Algorithm Strips for?

It is written for Year 5 (ages 9 to 10) in Key Stage 2. Younger children can try it with an adult, and older children may enjoy the loop and if steps as a quick check on what they know.

What will children practise?

They practise sequencing steps, debugging errors and predicting what loops and if steps do in an algorithm. They do this on paper by cutting, ordering, testing aloud and writing.

Do children need a computer?

No. The activity needs paper, scissors, glue and a pencil. Children test their order by reading and acting it out aloud, as a robot would, so no screen is used.

What if it feels too hard?

Ask the child to read each strip aloud as a robot would, and listen for the step that cannot happen yet. Place one strip at a time. Page 2 has more help ideas for the grown up.

What if the child wants more challenge?

Try question 8, which uses the new loop and asks how many slices are left from a loaf. Swapping sheets with a partner and following each other's order exactly also adds challenge.

Where are the answers?

They are on page 2, which is for the grown up. Page 2 also has notes on how to use the sheet, help for children who find it hard and a stretch idea.

Can teachers and home educators use it?

Yes. Teachers can use it as a starter, plenary or table activity. Home educators can use it alone or within a wider Computing plan. Both need no preparation beyond printing and cutting.

Preview the full PDF

Made by Jaques of London, making games for families since 1795. A printable supports classroom learning and does not replace a teacher.