Mini Minds Hub · Free printable

Crack the Times Table Code: Free Printable Worksheet for Year 5

In short: Free printable Crack the Times Table Code for Year 5 (ages 9 to 10). This quiz should ask 3 × 1 up to 3 × 5. Test it, then fix it.

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

Crack the Times Table Code asks Year 5 children (ages 9 to 10) to read a short program, write down the questions it asks, then find and fix a score bug and a loop bug. It suits children who are ready to explain what code does, not just run it, and it needs only a pencil.

Before anyone hunts for bugs, model the first line of the table together. Say aloud what the score and n hold after that line, then let the child do the next line. The usual slip is spotting a bug by guesswork. Ask children to keep a running note of both values and to explain each line in their own words.

What is on the sheet

Children read a short program that should ask times table questions from 3 × 1 up to 3 × 5. They fill in a table with a line column and a step column, writing the questions the program asks, in order. Then they hunt for two bugs, one in the score and one in the loop. For each bug they say which line holds it and write how to fix it.

  • Line
  • Step
  • Write the questions the program asks, in order.
  • Bug 1: Which line holds the score bug? Write how to fix it.
  • Bug 2: Which line holds the loop bug? Write how to fix it.

How the sheet builds debugging skills

Read first

Children start by reading the whole program without changing anything. This slows them down and stops the habit of jumping straight to a guess.

Predict and record

They write the questions the program asks, in order. This turns reading into a record that can be checked line by line.

Spot the score bug

Children look at the line that handles the score and ask whether it does what the quiz needs. They then write a fix in words.

Spot the loop bug

Next they check how the loop starts, changes and stops. They name the line and say how to correct it.

Why debugging matters in computing

A bug is a mistake in a program. Even experienced programmers write bugs, so finding and fixing them is a normal part of the job. Debugging means reading carefully, working out what the program really does, and comparing that with what it was meant to do. This sheet gives children a small, safe program to practise on.

The National Curriculum for England expects Key Stage 2 children to use logical reasoning to explain how simple algorithms work, and to detect and correct errors in programs. It also covers using repetition and working with variables. Reading a program on paper and tracing it by hand is a good way to build those habits before, or alongside, time at a computer.

Skills and curriculum link

  • Reading loops
  • Using variables
  • Finding bugs
  • Tracing line by line
  • Explaining a fix
  • Times table recall

Ideas that help with this sheet

  • Programs run in orderA computer follows instructions one line at a time. Children can point to each line with a finger as they read.
  • A variable stores a valueA variable has a name and holds something that can change as the program runs. Writing its value after each step helps.
  • Loops repeatA loop runs the same lines again and again. Check where it begins, how it changes each time and when it stops.
  • Testing shows bugsRunning a program by hand and comparing the result with what you expected is the quickest way to spot a mistake.

Key words

  • ProgramA set of instructions that a computer follows in order.
  • VariableA named place that stores a value. The value can change while the program runs.
  • LoopA part of a program that repeats the same instructions.
  • BugA mistake in a program that makes it do the wrong thing.
  • DebugTo find a bug and fix it.
  • PredictTo say what you think will happen before you check.

How to use it

  1. Print both pages. Page 1 is for the child. Keep page 2, which has the notes and answers, for the grown-up.
  2. Read the program together before anyone writes. Ask your child to say what they think it will do.
  3. Fill in the table by working through the program one line at a time. Write the questions it asks, in order.
  4. Look for the two bugs. For each one, write the line and a fix in words. Ask, "How do you know?"
  5. Check with page 2, then come back another day and try writing a new bug for someone else to find.

Help, stretch and game ideas

If it feels too hard

Act out the program with counters and cards. Use counters for the score and a card for n. Move them line by line, changing them exactly as the program says. Say each change aloud so your child can see what happens at every step.

To stretch confident children

Change the program to test a different times table, such as the 7 times table, with six questions. Write out the new lines you would need. Then trace your new program by hand to check that it asks the right questions.

Make it a game

Swap sheets with a partner. Each person writes a new bug into the program for the other to find and fix. Score one point for naming the right line and one more for a fix that works.

Mistakes to watch for

Watch forA child reads the program as if every line happens at once, so the questions come out in the wrong order.

Try thisPoint to one line at a time. Write the score and n after each line so the order becomes clear.

Watch forA child names a line as the bug but only says it is wrong, without saying how to fix it.

Try thisAsk, "What should this line say instead?" Then trace the program again with the new line to test it.

Watch forA child fixes one bug, then does not check the rest of the program again.

Try thisAfter every fix, trace from the start. A change in one place can affect what happens later.

Talk about it

  • What do you think this program is meant to do?
  • What does the score hold at the start, and how can you tell?
  • How did you know which line to look at first?
  • How would you explain a loop to a younger child?
  • If you could add one new feature to the quiz, what would it be?
  • How could you test your fix to make sure it works?

Take it off the page

Human computer

One person reads out the program lines. The other follows them exactly, holding a card for n and counting score on fingers. Swap roles.

Write your own quiz

Plan a short times table quiz on paper, with a score and a repeat. Trace it by hand, then give it to someone to check.

Robot instructions

Write exact steps for a simple task, such as drawing a square. A partner follows them literally and you find any bugs.

Who it is for

Parents

You do not need coding experience. Read the program together, let your child lead, and ask them to explain each line. Short sessions work well, and tracing with counters is a good way to help.

Teachers

Use it as a starter or plenary after teaching loops and variables, or as an unplugged task when computers are not available. It supports debugging and logical reasoning, and page 2 gives support and stretch for mixed groups.

Home educators

Pair it with everyday talk about instructions, such as recipes or routes. Work through it on a quiet afternoon, then let a brother or sister try writing a bug for your child to find.

Where this skill fits

Before this sheet, children usually learn to follow and write simple sequences of instructions and recall their times tables. They also begin to meet variables and repetition in small programs.

After it, children can write their own short programs with loops and variables, in a block based tool or another language. They can also test each program and fix errors in it, using the tracing habit practised here.

Keep practising

If this sheet went well, find more in our Year 6 computing worksheets and Year 6 worksheets and games, or try Crack Turing's Code, Computing Careers Cards, Fairy Tale Flowchart Fix or Frozen Cave Loop Quest next.

Browse: Mini Minds Hub > Year 6 worksheets and games > Year 6 computing worksheets

Questions parents and teachers ask

What age is this worksheet for?

It is written for Year 5, ages 9 to 10, in Key Stage 2. Younger children who already know simple loops may manage it with help, and older children can use the stretch idea.

Do children need a computer?

No. The whole sheet is done on paper with a pencil. Children read the program, trace it by hand and write their fixes in words, so no screen is needed.

What will children practise?

They practise reading a short program, predicting its output and debugging a loop and a score variable. They also use their 3 times table facts to check the questions the program asks.

What if my child cannot spot the bugs?

Try acting out the program with counters for the score and a card for n. Move line by line and say each change aloud. Seeing the values change often shows where the program goes wrong.

Does my child need to know how to code first?

No. A little experience with loops or variables helps, but the program is short and children read it line by line. Work through the first part together and then let them continue.

Can teachers use it in class?

Yes. It works as a starter, plenary, early finisher task or homework. It needs no preparation beyond printing, and it can be done alone or in pairs.

What is on page 2?

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

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.