GRADE 5 · COMPUTING · UNIT 1 · LESSON 1.28
Computational thinking and programming
Find faults and test device programs
The correct Signal Match rules are: start CountA = 0, CountB = 0, Locked = 0; A adds 1 to CountA and B adds 1 to CountB only while Locked = 0. First SHAKE sets Locked = 1 and shows V for equal counts or H for unequal counts. Later inputs are ignored until restart.
LET’S LOOK, THINK AND TRY
Find faults and test device programs
The correct Signal Match rules are: start CountA = 0, CountB = 0, Locked = 0; A adds 1 to CountA and B adds 1 to CountB only while Locked = 0. First SHAKE sets Locked = 1 and shows V for equal counts or H for unequal counts. Later inputs are ignored until restart.
- Find faults and test device programs.
- Trace and test the supplied device program safely on paper.

Explore the clues
Tap one card to find out more.
Understand the idea
The correct Signal Match rules are: start CountA = 0, CountB = 0, Locked = 0; A adds 1 to CountA and B adds 1 to CountB only while Locked = 0. First SHAKE sets Locked = 1 and shows V for equal counts or H for unequal counts. Later inputs are ignored until restart. Test each faulty version against these agreed rules.
Look at an example
In this faulty version, on B pressed mistakenly changes CountA by 1. A also changes CountA by 1. Both counts start at 0; nothing else changes them before SHAKE.
Explain with evidence
A faulty game gives the correct first result, but continues to accept button events afterwards. The agreed rules require the result and counters to stay fixed until restart. Use the condition Locked = 0 in both button handlers, and set Locked to 1 on the first SHAKE before displaying the result.

Think safely with Paxa!
Use the supplied examples and a paper simulation first. Ask a grown-up before using a device or creating an online account. Never share passwords or private information.
Use the supplied code, labels and records to explain your answer.
Our Unit 1 learning path
- Lesson 1.1: Meet variables and values
- Lesson 1.2: Trace variables and a robot route
- Lesson 1.3: Build a shared game counter
- Lesson 1.4: Debug and test variable programs
- Lesson 1.5: Calculate with stored numbers
- Lesson 1.6: Trace inputs and comparisons
- Lesson 1.7: Build and test a calculator
- Lesson 1.8: Debug calculator operations
- Lesson 1.9: Choose a path with selection
- Lesson 1.10: Trace branches on paper
- Lesson 1.11: Control a sprite with key conditions
- Lesson 1.12: Check branches and repair control bugs
- Lesson 1.13: Break a problem into clear parts
- Lesson 1.14: Compare and trace algorithms
- Lesson 1.15: Build a program from an outline
- Lesson 1.16: Test and improve a solution plan
- Lesson 1.17: Objects, behaviours and messages
- Lesson 1.18: Trace contacts and message effects
- Lesson 1.19: Build a two-sprite signal challenge
- Lesson 1.20: Debug interactions between objects
- Lesson 1.21: Meet the program-making team
- Lesson 1.22: Plan a useful program with clear criteria
- Lesson 1.23: Build and test a friendly four-question quiz
- Lesson 1.24: Evaluate, refine and retest a program
- Lesson 1.25: Inputs, conditions and LED outputs
- Lesson 1.26: Trace physical-device decisions on paper
- Lesson 1.27: Build the two-player Signal Match game
- Lesson 1.28: Find faults and test device programs
- Lesson 1.29: Paxa Mystery Number
For grown-ups: using this lesson
Explore the computing idea together, then try the workbook. Your answers are checked in your browser. Open responses need grown-up review and are shown separately from the automatic score. Check your work, then use “Retry answers to practise” to revisit mistakes while keeping correct responses.
Choose “Mark lesson finished” when ready. Optional account progress saves position and completion; save personal workbook responses before leaving. Use fictional data; do not share names, passwords or other private information.
2. Fill in your workbook
Read each page’s explanation and use its own diagrams, labels and supplied records. Choose, write or draw. Use Answer list for larger controls.
Opening your PDF…
Swipe sideways across the worksheet on a small screen, or use “Answer list” for larger controls.
You’ve completed the checked activities.
TAKE YOUR PRACTICE OFFLINE
3. Download the student worksheet
All 6 original A4 student pages, ready for pencil-and-paper practice. Choose Review Answers to check your work on this webpage.
Student worksheet only · PDF · 8.7 MiB · No answer key included
TRY FIRST, THEN CHECK TOGETHER
Download the student worksheet →4. Answers & guidance
Finished your try? Open the guide and compare one worksheet at a time. Your own words may be different and still explain the right idea.
Shown on this webpage only. There is no answer-key download, and this guide is left out when printing the page.
Show answers for all 6 worksheets
Worksheet 1
- Question 1: What should a test compare? a) Expected and actual behaviour
- Question 2: What follows a code repair? b) Repeat relevant tests
- Question 3: Does one passing test prove all cases work? a) No
Worksheet 2
- Question 4: In test D, what is the faulty CountA before SHAKE? 2 / two
- Question 5: In test D, what should CountB be with correct code? 1 / one
- Question 6: Which repair fixes the named fault? a) B changes CountB instead
Worksheet 3
- Question 7: What must be repaired? c) Swap V and H
- Question 8: Before repair, which pattern does 2 = 2 choose? H
Worksheet 4
- Question 9: Which required action is missing? c) Clear the screen on start
- Question 10: Are the three stored values reset correctly? a) Yes
- Question 11: What should happen after adding the missing action? b) Retest restart after a completed round
Worksheet 5
- Question 12: Which pattern is expected for 0 and 0? V
- Question 13: Which pattern is expected for 2 and 0? H
- Question 14: Which test checks the lock rule? a) Press A after the result appears
Worksheet 6
- Question 15: Explain how the stated Locked repair prevents the counters from changing after the first result. First SHAKE sets Locked = 1. Later button handlers test Locked = 0, which is False, so their increment instructions are skipped. Restart restores Locked = 0 for a new round. Accept equivalent causal explanation. Grown-up review.
- Question 16: Give a complete test sequence for this repair and its expected counts and result. Accept a fresh sequence with stated counts before SHAKE plus later A/B inputs that must be ignored, e.g. A, B, SHAKE, A, B gives CountA = 1, CountB = 1, Locked = 1 and V unchanged. The expected counts must match the chosen pre-SHAKE inputs. Grown-up review.
Curriculum & workbook reference
- Cambridge Primary Computing Learner’s Book 5 — pages 105–117
- PaxaKids Grade 5 Computing Lesson 1.28: Find faults and test device programs — pages 1–6
Computing for your homeschool day
Explore Using selection with a physical device with this free Grade 5 Computing lesson. Read one idea together, try the fillable workbook and return to review at your own pace. Download the same student worksheet PDF for pencil-and-paper practice.
Fit learning around your family’s day. There is no timer and no sign-up is needed to use the lesson. An optional account saves your lesson position and completion across devices. Workbook responses and drawings stay in this tab; save a copy of your responses before leaving.
Understand your results
Your answers are checked in your browser. Open responses need grown-up review and are shown separately from the automatic score. Check your work, then use “Retry answers to practise” to revisit mistakes while keeping correct responses.
Choose Review Answers after trying the activity. The guide stays on the webpage; the worksheet download contains only the student pages.
For curriculum background, visit the Cambridge Primary Computing overview.
The book pages identify the related computing topic. The teaching and workbook activities are original PaxaKids learning materials.
