GRADE 5 · COMPUTING · UNIT 1 · LESSON 1.27

Computational thinking and programming

Build the two-player Signal Match game

Build Signal Match in MakeCode using a simulator or a micro:bit. Restart sets CountA, CountB and Locked to 0 and clears the display. A adds 1 to CountA; B adds 1 to CountB.

Topic 1.7 · Using selection with a physical device6 fillable worksheet pagesRead at your own pace

LET’S LOOK, THINK AND TRY

Build the two-player Signal Match game

Build Signal Match in MakeCode using a simulator or a micro:bit. Restart sets CountA, CountB and Locked to 0 and clears the display. A adds 1 to CountA; B adds 1 to CountB.

I can…
  • Build the two-player Signal Match game.
  • Trace and test the supplied device program safely on paper.
An original PaxaKids workbook scene for using selection with a physical device.
An original workbook scene. Use each worksheet’s own diagrams, labels and records for its questions.

Explore the clues

Tap one card to find out more.

Understand the idea

Build Signal Match in MakeCode using a simulator or a micro:bit. Restart sets CountA, CountB and Locked to 0 and clears the display. A adds 1 to CountA; B adds 1 to CountB. SHAKE compares the counts: V means equal, H means unequal. The first SHAKE locks the game; later inputs are ignored until restart. Use one action at a time, with complete button presses and releases.

Look at an example

Show the V pattern when the counts match; show H when they do not. In MakeCode Basic, use show leds and click exactly the five lit cells shown in the appropriate pattern. The display stays on that result until restart.

Explain with evidence

The complete game uses four handlers: on start, on A pressed, on B pressed and on shake. The counters begin at 0; only unlocked button events add to them. SHAKE selects one result and locks it.

Paxa the Fox

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
  1. Lesson 1.1: Meet variables and values
  2. Lesson 1.2: Trace variables and a robot route
  3. Lesson 1.3: Build a shared game counter
  4. Lesson 1.4: Debug and test variable programs
  5. Lesson 1.5: Calculate with stored numbers
  6. Lesson 1.6: Trace inputs and comparisons
  7. Lesson 1.7: Build and test a calculator
  8. Lesson 1.8: Debug calculator operations
  9. Lesson 1.9: Choose a path with selection
  10. Lesson 1.10: Trace branches on paper
  11. Lesson 1.11: Control a sprite with key conditions
  12. Lesson 1.12: Check branches and repair control bugs
  13. Lesson 1.13: Break a problem into clear parts
  14. Lesson 1.14: Compare and trace algorithms
  15. Lesson 1.15: Build a program from an outline
  16. Lesson 1.16: Test and improve a solution plan
  17. Lesson 1.17: Objects, behaviours and messages
  18. Lesson 1.18: Trace contacts and message effects
  19. Lesson 1.19: Build a two-sprite signal challenge
  20. Lesson 1.20: Debug interactions between objects
  21. Lesson 1.21: Meet the program-making team
  22. Lesson 1.22: Plan a useful program with clear criteria
  23. Lesson 1.23: Build and test a friendly four-question quiz
  24. Lesson 1.24: Evaluate, refine and retest a program
  25. Lesson 1.25: Inputs, conditions and LED outputs
  26. Lesson 1.26: Trace physical-device decisions on paper
  27. Lesson 1.27: Build the two-player Signal Match game
  28. Lesson 1.28: Find faults and test device programs
  29. 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.

Build the two-player Signal Match game6 student pages · original artwork

Opening your PDF…

Swipe sideways across the worksheet on a small screen, or use “Answer list” for larger controls.

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

Download worksheet PDF ↓

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

  1. Question 1: What resets all three variables for a new game? c) Restarting the program
  2. Question 2: What should SHAKE compare? b) CountA and CountB
  3. Question 3: What happens to later inputs after the first SHAKE? b) They are ignored until restart

Worksheet 2

  1. Question 4: Which block creates these exact five-dot patterns? c) show leds
  2. Question 5: How many LEDs are lit in each pattern? 5 / five
  3. Question 6: Why use different patterns? c) To distinguish equal and unequal results

Worksheet 3

  1. Question 7: Which handler changes CountB? b) On B pressed
  2. Question 8: What value of Locked allows a button handler to add 1? 0 / zero

Worksheet 4

  1. Question 9: Why set Locked before displaying the pattern? a) To reject later game inputs

Worksheet 5

  1. Question 10: Which result pattern is expected in test 1? V
  2. Question 11: Which result pattern is expected in test 2? H
  3. Question 12: What is CountA at the end of test 3? 0 / zero

Worksheet 6

  1. Question 13: Explain what happens for A, A, B, SHAKE, B from a fresh start. Give final CountA, CountB, Locked and the result pattern. After two A events CountA = 2; B makes CountB = 1; SHAKE sets Locked = 1 and shows H because 2 is not equal to 1. The last B event is ignored. Final values: 2, 1, 1; H. Grown-up review.
  2. Question 14: Describe one test that checks restart properly prepares a new game. Finish a round with non-zero counts and a displayed result, restart, then verify CountA = 0, CountB = 0, Locked = 0 and a blank display. Confirm an A or B press can increment the relevant counter again. Accept equivalent explicit reset test. Grown-up review.
Back to my workbook ↑

Curriculum & workbook reference

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.