Mini Minds Hub · Free printable

What Does This Algorithm Do?: Free Printable Worksheet for Year 5

In short: Free printable What Does This Algorithm Do? for Year 5 (ages 9 to 10). Match each algorithm to its purpose, then to its output. With notes for grown-ups.

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

What Does This Algorithm Do? is a Computing worksheet for Year 5 (ages 9 to 10). Children read short algorithms that use repeats and choices, match each one to its purpose and its output, trace inputs step by step, and spot bugs in two bug checks. It suits children who can follow written steps and are ready to explain why an algorithm gives the result it does.

Before they choose a purpose, model one trace on scrap paper. Write the input, follow the first step aloud, then write down the new value after every step. The usual slip is skipping a repeat or counting it once too often, so ask your child to tick each pass of the repeat as they go.

What is on the sheet

Children begin with Part 1, matching each algorithm to its purpose. Every algorithm is a short list of steps that uses repeats and choices, so they read it closely before deciding. In Part 2 they take an input, follow the steps one at a time, and match the algorithm to its output. The sheet ends with two bug checks, where children look carefully for a bug.

What is an algorithm?

An algorithm is a set of clear steps that solves a problem or completes a task. A recipe, a set of directions to the school gate and the rules of a board game are all algorithms. A computer cannot guess what you meant. It follows each step exactly as written, in the order given.

Two ideas appear again and again. A repeat means doing the same steps more than once. A choice means checking something and then taking one path or another. Once children can follow these, they can say what an algorithm is for, and they can tell when it has gone wrong.

Algorithm facts for children

  • An algorithm is a set of steps that solves a problem.
  • A recipe is a good everyday example of an algorithm.
  • Computers follow algorithms exactly, one step at a time.
  • A bug is a mistake that stops an algorithm doing what it should.
  • The word algorithm comes from the name of a Persian scholar who lived long ago.

Skills and curriculum link

  • Reading algorithms
  • Tracing inputs
  • Spotting bugs
  • Following repeats
  • Following choices
  • Explaining reasoning

Ideas that help with this sheet

  • Input and outputAn input is what goes into an algorithm. The output is what comes out at the end. Tracing connects the two.
  • RepeatA repeat runs the same steps again. Counting each pass keeps a trace accurate.
  • ChoiceA choice checks a condition, then follows one path. Children decide which path before moving on.
  • PurposeThe purpose is what the algorithm is for. It is often clearer once you have traced a small input.

Key words

  • AlgorithmA set of clear steps that solves a problem or does a task.
  • InputWhat you give to an algorithm to start with.
  • OutputWhat the algorithm gives you at the end.
  • RepeatDoing the same steps again, more than once.
  • TraceFollow an algorithm step by step and write down what changes.
  • BugA mistake in an algorithm that stops it working as it should.

How to use it

  1. Print both pages. Page 1 is for your child. Keep page 2, which has notes for you.
  2. Read the first algorithm aloud together. Ask what it seems to be for before your child writes anything.
  3. Let your child do Part 1, then trace each input in Part 2 using the steps. Scrap paper helps for writing down each change.
  4. Move on to the two bug checks. Ask your child to say how they know where the bug is.
  5. Check against the notes on page 2, then come back another day to try again.

Help, stretch and game ideas

If it feels too hard

Read each algorithm aloud together. Act out the repeat step with counters or fingers, so each pass is something your child can see. Trace a small input first, then choose a purpose. Go back to Part 1 once the pattern is clear.

To stretch confident children

Ask your child to choose a new input for one algorithm. They work out its output on scrap paper, then explain how they know. They could also change one step on purpose and predict what happens to the output.

Make it a game

Work in pairs. One child reads an algorithm aloud and the other names its purpose. Then they trace the input together and check the match. Swap roles for the next algorithm and keep going.

Mistakes to watch for

Watch forA child skips a repeat or does it one time too few or too many.

Try thisDraw a tick for each pass of the repeat. Check the tally against what the algorithm says before moving on.

Watch forA child traces only the last step and ignores the changes before it.

Try thisWrite the value after every step in a column. Each new line begins from the line above.

Watch forA child chooses a purpose from the first step alone.

Try thisTrace a small input all the way through first. Then ask whether the purpose still fits.

Talk about it

  • What do you think this algorithm is for? What made you think that?
  • Which step repeats? How many times does it repeat for this input?
  • Where does a choice happen? Which path did you take?
  • How could you check your output a second way?
  • What would change if the input were different?
  • How did you spot the bug? What did you look at first?

Take it off the page

Draw by instructions

Write steps for drawing a simple picture. Read them to a partner who draws without seeing the original. Compare the two pictures and look for steps that were unclear.

Human robot

Make arrow cards for forward, turn left and turn right. One child gives the steps and the other moves across the room. Add a repeat card to shorten the list.

Bug hunt at home

Write the steps for getting ready for school, with one step out of order. Ask someone to find the bug and say what goes wrong because of it.

Who it is for

Parents

Sit beside your child for the first algorithm, then let them lead. Ask them to explain each trace aloud. If they get stuck, work with counters or a small input first.

Teachers

Use it as a starter, plenary, early finisher task or homework. It connects to the Key Stage 2 computing strand on using logical reasoning to explain how simple algorithms work. Pair children so they can talk through each trace.

Home educators

Print it alongside other computing activities in your plan. It needs paper and a pencil, so it works away from a device. Repeat it later for revision or for a younger sibling to watch and discuss.

Where this fits

Before this sheet, children follow and give simple instructions, put steps in order, and meet the idea that computers need exact steps. They then add repeats and choices.

After it, children are ready to write their own algorithms and programs, and to find and fix bugs in them. Tracing by hand builds the habit of checking each step, which is the skill they use when testing a program.

Keep practising

If this sheet went well, find more in our Year 5 computing worksheets guide, or try Safe Chatting Cards, Fewest Steps Race, Bug Hunt Around Town or Fake News Spotter next.

Questions parents and teachers ask

What age is What Does This Algorithm Do? for?

It is written for Year 5 (ages 9 to 10), in Key Stage 2. Children who are confident with simple algorithms can use it in Year 6. Younger children can try it with a grown up reading each algorithm aloud.

What will children practise?

Children practise explaining what short algorithms with repeats and choices do, tracing inputs through the steps, and spotting bugs. They read closely, follow each step in order and explain their thinking in Computing.

How do I use it?

Print both pages and give page 1 to your child. Children match Part 1 first, then trace each input in Part 2 using the steps, and finish with the two bug checks. Work through it together the first time.

What is a bug?

A bug is a mistake in an algorithm or program that stops it doing what it should. On this sheet, children spot bugs in two bug checks. Tracing an algorithm carefully is the best way to find one.

What if it feels too hard?

Read each algorithm aloud together. Act out the repeat step with counters or fingers before choosing a purpose. Trace a small input first, so each step is clear, then return to the matching.

Is this a screen free activity?

Yes. It needs only paper and a pencil, so it works for quiet time, rainy days and school holidays. Scrap paper is useful for writing down each change while tracing an input.

Can teachers use it in class?

Yes. It works as a starter, plenary, early finisher task, homework or table activity. It needs no preparation beyond printing. Page 2 has support and stretch ideas for children working at different levels.

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.