Mini Minds Hub · Free printable

Frozen Cave Loop Quest: Free Printable Worksheet for Year 6

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

Frozen Cave Loop Quest is a computing worksheet for Year 6 (ages 10 to 11). Children read routes written as short codes, match them to loops, then find and fix bugs. It suits children who can already follow a simple loop and are ready to meet a loop inside a loop.

Before they write anything, model one route on a floor grid or squared paper. Say the inner loop aloud, "do this chunk three times", then ask what happens once it has finished. The usual slip is putting the turn inside the wrong loop. A quick check is to ask the child to expand their short version back into the full route and compare it with the original.

What is on the sheet

Children work down page 1 in order. They read routes written as short codes, match each route to the loops that make it, and shorten long routes by spotting a pattern inside a pattern. They also meet code with bugs, where they must work out what has gone wrong and fix it. There is space to write answers, so children can show their thinking as well as their final code.

  • Shorten this route using a loop inside a loop: F F F R F F F R F F F R

A loop inside a loop

Shorten this route using a loop inside a loop: H H C H H C H H C J H H C H H C H H C J. In this example, H is hop, C is clap and J is jump.

This example uses different actions from the sheet. It shows how to find a small repeating chunk first, then a bigger one that contains it.

Method 1: build from the inside out
  1. Find the smallest chunk that repeats. Here it is H H C.
  2. It appears three times in a row, so write Repeat 3 [H H C].
  3. After those three chunks comes J. So the bigger chunk is Repeat 3 [H H C] then J.
  4. That bigger chunk appears twice, so wrap it in another loop: Repeat 2 [Repeat 3 [H H C], J].
Method 2: check by expanding
  1. Start with the inner loop. Repeat 3 [H H C] means H H C H H C H H C.
  2. Add the J after it. One go of the outer loop is H H C H H C H H C J.
  3. Do the outer loop twice.
  4. Compare with the original route. If every action matches in order, the short code is right.
Repeat 2 [Repeat 3 [H H C], J]

Ways to build loop understanding

Walk it first

Tape a grid on the floor. One child walks the route while another reads each command. Moving through the steps makes a pattern easier to see.

Circle the chunk

On a long route, circle the smallest group that repeats. Then look for a bigger group that repeats too. This is how nested loops are found.

Say the loop aloud

Read short code in full sentences, such as "repeat this three times, then do this once". Hearing it helps children notice what sits inside which loop.

Expand to check

Rewrite the short code as the full route and compare it with the original. This is a reliable way to test a shortened version or a fix.

Loops, nesting and debugging

An algorithm is a set of clear steps to solve a problem or complete a task. Computers follow algorithms exactly, so every step must be in the right order. A loop is a way to repeat steps without writing them out again and again. Loops make code shorter, easier to read and easier to change.

A nested loop is a loop inside another loop. Each time the outer loop goes round once, the inner loop runs all of its repeats. A bug is a mistake in an algorithm, and debugging means finding it and fixing it. Key Stage 2 computing includes designing, writing and debugging programs, and using repetition in them.

Skills and curriculum link

  • Reading nested loops
  • Shortening algorithms
  • Finding and fixing bugs
  • Logical thinking
  • Explaining reasoning

Ideas to help with loops

  • Spot the patternLook for a group of commands that appears more than once in a row. Say the group aloud, then count how many times it repeats.
  • Work inside outDeal with the inner loop first. Once it makes sense, ask how many times the bigger group around it repeats.
  • Test one step at a timeRun code with a finger or counter, one command at a time. Bugs often show up at the point where the route goes wrong.
  • Change one thingWhen fixing a bug, change only one part, then run it again. This shows which change made the difference.

Key words

  • AlgorithmA list of clear steps that tells someone or something what to do.
  • CommandOne instruction in an algorithm, such as a move or a turn.
  • LoopA way to repeat commands a set number of times.
  • Nested loopA loop placed inside another loop. The inner loop runs fully each time the outer loop goes round.
  • BugA mistake in code that makes it do the wrong thing.
  • DebugTo find a bug and fix it.

How to use it

  1. Print both pages. Page 1 is for the child. Keep page 2 for the grown-up.
  2. Read the key commands together first, so everyone agrees what each one means.
  3. Let the child work down page 1 in order. Ask them to say each loop aloud as they go.
  4. Check together with the answers on page 2. Ask, "How did you know?" before you say whether it is right.
  5. Come back another day and redo the bug fixing. Repeating a familiar task builds confidence.

Help, stretch and game ideas

If it feels too hard

Let children act out each route on a floor grid, or draw it on squared paper, before writing the code. Move one command at a time and say it aloud. Once the route is clear, look for the part that repeats.

To stretch confident children

Ask children to invent their own buggy nested loop for a partner to find and fix. They should keep a bug free copy to check against. Then swap roles and see whose bug is hardest to spot.

Make it a game

Play Cave Caller. One child reads a loop aloud and the other walks the route on a taped floor grid. If the walker ends up in the wrong place, they work together to find the bug. Then swap jobs.

Mistakes to watch for

Watch forA child puts a turn inside the inner loop when it should happen after it, so the route is wrong.

Try thisExpand the code in full and walk it. Ask where the turn happens each time, then move it to the right place.

Watch forA child counts the repeats wrongly and adds them instead of working out what each loop covers.

Try thisAsk them to say how many times the inner loop runs in one go of the outer loop. Write out one full go before counting the rest.

Watch forA child shortens a route but changes it, so the short code no longer matches.

Try thisExpand the short code and lay it beside the original, command by command. The first place they differ shows the problem.

Talk about it

  • How did you spot which part repeats?
  • Which loop is inside, and which is outside? How can you tell?
  • What would change if the turn sat inside the inner loop?
  • How did you find the bug? What clue gave it away?
  • Is there more than one way to shorten this route? Which is easier to read?
  • How could you check your short code is right?

Take it off the page

Floor grid routes

Make a grid on the floor with masking tape. Write a route on paper and take turns walking it. Try adding a loop and see if the walker ends up in the same place.

Dance loops

Make up a short dance with three moves. Write it as code with a loop, then perform it. Add an outer loop to repeat the whole dance.

Bug hunt

Write a short route on squared paper with one mistake. Swap with someone else and ask them to find the bug and explain how they fixed it.

Who it is for

Parents

Sit with your child for the first route, then let them lead. Ask them to say each loop aloud. If they get stuck, walk the route together on a grid and talk about what happens at each turn.

Teachers

Use it as a starter, plenary, early finisher task, homework or table activity after teaching repetition. It needs no preparation beyond printing. Pair children to check with the answer key, and use the support and stretch ideas for mixed ability groups.

Home educators

This works well as part of a wider computing plan with no screen needed. Let the learner act out routes, explain their thinking and invent their own bugs. Use it again later for revision or for younger brothers and sisters to watch and join in.

Where this fits in computing

Before this sheet, children work with sequences of commands and simple loops. They learn that order matters and that repeating a group of commands makes code shorter. Reading a route and predicting where it ends is a useful early skill.

After this sheet, children can move to writing and debugging programs on a screen, using repetition in block based or text based languages. They can also look at loops that repeat until something happens, and at breaking big problems into smaller parts.

Questions parents and teachers ask

What age is Frozen Cave Loop Quest for?

It is written for Year 6 (ages 10 to 11), in Key Stage 2. It suits children who can follow a simple loop and are ready to read loops inside loops.

What will children practise?

Children practise reading, shortening and debugging algorithms that use loops inside loops. They match loops to routes, then find and fix bugs, explaining their thinking as they go.

How do I use it?

Read the key commands together first. Children then work down the sheet in order and check with a partner using the answer key on page 2. Talk about each choice the first time.

What if it feels too hard?

Let children act out each route on a floor grid, or draw it on squared paper, before writing the code. Moving through the commands one at a time makes the repeating parts easier to see.

Do children need a computer?

No. It is a screen free activity that needs only paper and a pencil. A taped floor grid or squared paper can help, but the sheet works without them.

Are the answers included?

Yes. Page 2 is for the grown-up and includes the answers, as well as notes on how to use the sheet, help for children who find it hard, and a stretch idea.

How long does it take?

It depends on the child and how much they talk through each route. Let them work at their own pace and take a break if needed. Page 2 has help and stretch ideas to adjust the challenge.

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.