GRADE 8 · COMPUTING · UNIT 1 · LESSON 1.49

Computational thinking and programming

Trace numeric message sequences

Read a little. Try the workbook. Check your answers. Choose one section below to get started.

Topic 1.49 · Trace numeric message sequences8 fillable worksheet pagesRead at your own pace

LET’S TRACE, REASON AND TEST

Trace numeric message sequences

Trace message sends and receives in the stated order. A receiver's stored value and visible display may change for each event. A final display does not preserve the whole message history.

Today’s two goals
  • Predict number transmissions and design a countdown or reciprocal display sequence.
  • Explain my method and support it with a labelled trace, example or test record.
Original PaxaKids illustration for Trace numeric message sequences. Use the supplied program and data models for precise workbook facts.
An original PaxaKids workbook scene. Use the supplied programs and data for precise workbook facts.

Work through an example

In a simplified model receiving 2, then 4, then 6, a handler displaying each value processes three events and finishes by displaying 6. The last display alone does not prove all earlier events occurred.

Try before your workbook

If a model receives 8 then 3 and displays each, what is the final displayed value?

Explore the clues

Tap one card to find out more.

Understand the idea

Trace message sends and receives in the stated order. A receiver's stored value and visible display may change for each event. A final display does not preserve the whole message history.

Concept to practise: Trace numeric message sequences.

Work through an example

In a simplified model receiving 2, then 4, then 6, a handler displaying each value processes three events and finishes by displaying 6. The last display alone does not prove all earlier events occurred.

Try before your workbook

If a model receives 8 then 3 and displays each, what is the final displayed value?

Check my readiness thinking

It is 3 in that stated event order. Record both events if the task asks for the sequence rather than only the final state.

Your original programs and learning models

These original PaxaKids program and data models support your workbook. Some examples deliberately contain faults to investigate. Follow their headings and preserve exact code case, punctuation and order. Traces and supplied records are not claims of physical testing.

Trace a sequence of numeric messages

One input event can send several messages in a stated order. The receiver handles arriving numbers with its number event and uses the received value for output.

Predict the intended sequence first. A real radio experiment may lose messages or behave differently from an ideal trace. Keep actual observations separate. This example adds pauses between sends to make separate outputs easier to observe; pauses do not guarantee delivery.

Read the complete original sequence pair

The sender uses A to request 2, 4, 6, 8 and 10 in order. The receiver clears its LEDs then shows each received number. In Blocks, use on start -> set group 17, an A handler containing the five sends and pauses, and a matching number-received handler on the other device.
Sequence sender
radio.setGroup(17)
input.onButtonPressed(Button.A,
    function () {
        radio.sendNumber(2)
        basic.pause(1200)
        radio.sendNumber(4)
        basic.pause(1200)
        radio.sendNumber(6)
        basic.pause(1200)
        radio.sendNumber(8)
        basic.pause(1200)
        radio.sendNumber(10)
    })
Number receiver
radio.setGroup(17)
radio.onReceivedNumber(
    function (receivedNumber) {
        basic.clearScreen()
        basic.showNumber(receivedNumber)
    })

Model the intended order of handling

This original diagram shows an ideal logical sequence, not an observed radio trace. Assume all five messages reach the prepared receiver and are handled in order. Use the page 2 send values to complete the prediction.
Model the intended order of handling — original labelled workbook model. The following text version gives its labels and values.
Model the intended order of handling · original PaxaKids model.
Read this model’s labels and values

Investigate settings, trigger and received data

Use the complete page 2 pair. The receiver’s event parameter supplies each arriving number. clearScreen turns LEDs off before showNumber displays the value; multi-digit values such as 10 scroll.

Modify the sends to make a complete countdown

This original changed sender requests 10 down to 1. Use the same page 2 receiver. The pause guide defines durations in milliseconds; 1200 ms is 1.2 seconds of requested pause time, not an exact total experiment duration. Each value remains a separate number message.
Original Paxa countdown sender
radio.setGroup(17)
input.onButtonPressed(Button.A,
    function () {
        radio.sendNumber(10)
        basic.pause(1200)
        radio.sendNumber(9)
        basic.pause(1200)
        radio.sendNumber(8)
        basic.pause(1200)
        radio.sendNumber(7)
        basic.pause(1200)
        radio.sendNumber(6)
        basic.pause(1200)
        radio.sendNumber(5)
        basic.pause(1200)
        radio.sendNumber(4)
        basic.pause(1200)
        radio.sendNumber(3)
        basic.pause(1200)
        radio.sendNumber(2)
        basic.pause(1200)
        radio.sendNumber(1)
    })

Make a reciprocal pair with different send sequences

Both original programs can send and receive. Device A sends 1–5 when its A button is pressed; Device B sends 5–1 when its A button is pressed. Each displays numbers received from the other. Test one direction at a time so the intended behaviour is clear.
Device A program
radio.setGroup(17)
input.onButtonPressed(Button.A,
    function () {
        radio.sendNumber(1)
        basic.pause(1200)
        radio.sendNumber(2)
        basic.pause(1200)
        radio.sendNumber(3)
        basic.pause(1200)
        radio.sendNumber(4)
        basic.pause(1200)
        radio.sendNumber(5)
    })
radio.onReceivedNumber(
    function (receivedNumber) {
        basic.clearScreen()
        basic.showNumber(receivedNumber)
    })
Device B program
radio.setGroup(17)
input.onButtonPressed(Button.A,
    function () {
        radio.sendNumber(5)
        basic.pause(1200)
        radio.sendNumber(4)
        basic.pause(1200)
        radio.sendNumber(3)
        basic.pause(1200)
        radio.sendNumber(2)
        basic.pause(1200)
        radio.sendNumber(1)
    })
radio.onReceivedNumber(
    function (receivedNumber) {
        basic.clearScreen()
        basic.showNumber(receivedNumber)
    })

Files for this activity

Use these original PaxaKids practice files with the matching workbook. Work on a local copy in the appropriate editor. Some examples deliberately contain faults to investigate; a downloaded file is not a completed practical test.

Paxa the Fox

Try one step with Paxa!

Trace code in the stated order and preserve exact spelling and case. Use fictional data. Label a prediction, paper trace, simulator run and physical-device test separately; an unperformed test stays Pending. Save personal responses before leaving.

Our Unit 1 learning path
  1. Lesson 1.1: Recall algorithms and representations
  2. Lesson 1.2: Purpose and conventions of pseudocode
  3. Lesson 1.3: Input, output and strings
  4. Lesson 1.4: Identifiers and assignment
  5. Lesson 1.5: Arithmetic and translation
  6. Lesson 1.6: Trace and review a sequence
  7. Lesson 1.7: Conditions and two-way flow
  8. Lesson 1.8: IF THEN and indentation
  9. Lesson 1.9: IF THEN ELSE and decision diagrams
  10. Lesson 1.10: Ordered ELSEIF and fallback ELSE
  11. Lesson 1.11: Match flowchart and pseudocode branches
  12. Lesson 1.12: AND, OR and NOT
  13. Lesson 1.13: Grouping, precedence and review
  14. Lesson 1.14: Why software searches
  15. Lesson 1.15: A successful linear search
  16. Lesson 1.16: An unsuccessful search and termination
  17. Lesson 1.17: Practise and communicate the search
  18. Lesson 1.18: Translate conditions into Python
  19. Lesson 1.19: One-branch IF programs
  20. Lesson 1.20: Two-way IF ELSE programs
  21. Lesson 1.21: Ordered ELIF choices
  22. Lesson 1.22: Ranges and independent decisions
  23. Lesson 1.23: Boolean operators in Python
  24. Lesson 1.24: Design and test recommendations
  25. Lesson 1.25: Trace, debug and reflect
  26. Lesson 1.26: Choose data types and recognise Boolean literals
  27. Lesson 1.27: Set and use Boolean flags
  28. Lesson 1.28: Explain and identify constants
  29. Lesson 1.29: Express constants in three algorithm forms
  30. Lesson 1.30: Use a fixed factor in a calculation
  31. Lesson 1.31: Cast to Boolean and validate an empty response
  32. Lesson 1.32: Recall calls and trace return values
  33. Lesson 1.33: Supply parameters and reuse library code
  34. Lesson 1.34: Choose and import libraries responsibly
  35. Lesson 1.35: Round with floor and ceiling
  36. Lesson 1.36: Use pi and investigate another mathematical feature
  37. Lesson 1.37: Generate random choices within bounds
  38. Lesson 1.38: Investigate random real values and review library use
  39. Lesson 1.39: Retrieve test tables and predict selection outcomes
  40. Lesson 1.40: Decompose everyday problems
  41. Lesson 1.41: Decompose programs and organise shared work
  42. Lesson 1.42: Develop through repeated build/test cycles
  43. Lesson 1.43: Predict and verify algorithm outcomes
  44. Lesson 1.44: Choose representative and boundary tests
  45. Lesson 1.45: Build, execute and review a test plan
  46. Lesson 1.46: Recall physical inputs and compare transmission media
  47. Lesson 1.47: Configure a radio group and agree a message scheme
  48. Lesson 1.48: Send and receive numbers and strings
  49. Lesson 1.49: Trace numeric message sequences
  50. Lesson 1.50: Transmit text and use received data in conditions
  51. Lesson 1.51: Diagnose and extend a message protocol
  52. Lesson 1.52: Review communication and evidence of testing
  53. Lesson 1.53: Project 1: Adventure story
  54. Lesson 1.54: Project 2: Fire, Water, Earth
  55. Lesson 1.55: Check your progress 1
For grown-ups: using this lesson

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.

Read one explanation, discuss the model and try the readiness check before the workbook. Choose “Mark lesson finished” when ready. Optional account progress saves lesson position and completion across devices; save personal responses before leaving.

2. Fill in your workbook

Read the teaching and complete workbook instructions. Choose, write or draw; Answer list offers larger controls. Trace code precisely and distinguish predictions from actual tests. Review designs, explanations and drawings with a grown-up.

Trace numeric message sequences8 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 8 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.2 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 8 worksheets

Worksheet 1

  1. Question 1: What does the intended sequence describe? the ordered values the program requests to send
  2. Question 2: What should be recorded after an actual experiment? what the receiver really showed, or Pending if unrun

Worksheet 2

  1. Question 3: How many sendNumber calls are inside the A handler? 5
  2. Question 4: How many milliseconds are requested between sends? 1200

Worksheet 3

  1. Question 5: Write the five intended receiver values in order. 2, 4, 6, 8, 10 / 2,4,6,8,10

Worksheet 4

  1. Question 6: Which group is explicitly set on both devices? 17
  2. Question 7: Which input triggers the sender’s sequence? A / Button A
  3. Question 8: Which parameter supplies the receiver’s current number? receivedNumber
  4. Question 9: What local LED output does this sender code add? none

Worksheet 5

This page introduces the activity. There are no marked responses on this sheet.

Worksheet 6

This page introduces the activity. There are no marked responses on this sheet.

Worksheet 7

  1. Question 10: Prepare the complete page 2 pair and predict each device’s behaviour before testing. Identify group, trigger, send values, received parameter and local outputs. Record actual supported-environment/device results or Pending, keeping ideal traces separate. Then change the sender to the complete page 5 countdown and predict 10 down to 1 before retesting. Keep both source versions, device assignments, test records, corrections and any unexpected or missing messages. Attach full evidence and cite it here. Baseline intended sends and receiver values 2, 4, 6, 8, 10 under stated delivered/in-order assumptions; group 17, A trigger, receivedNumber used by clearScreen/showNumber handler. Sender adds no local LED output. Countdown intended 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 using same receiver. Pauses request 1200 ms between sends and aid observation, not delivery guarantee or exact wall-clock spacing. Multi-digit 10 scrolls. Full saved versions and device roles, predictions before actual/Pending observations, retained missing/unexpected events and corrections/retests. Paper/stub logic trace distinct from real radio or supported-environment test; no invented results. Grown-up review; personal evidence is required.

Worksheet 8

  1. Question 11: Use or recreate the two complete page 6 programs. Predict Device B’s received sequence when A is pressed on Device A, and Device A’s sequence when A is pressed on Device B. Test directions separately and record actual results or Pending. Keep full source, group settings, device assignments and corrections/retests. Reflect in words on your decision-making, the parts you programmed and your use of radio features, supporting each with evidence. State your contribution, any actual partner feedback or Pending, and one next step. Device A A press requests 1, 2, 3, 4, 5 for Device B; Device B A press requests 5, 4, 3, 2, 1 for Device A, with group 17 on both and one number-received handler per program. Each locally displays only numbers handled by its receive event, not automatically its own sent sequence. Test directions separately, identify exact saved programs and actual/Pending results, account honestly for loss/duplicates/unexpected behaviour and corrections/retests. Reflection covers decision-making, own programmed parts and radio-feature use with descriptive confidence and specific evidence, without numeric ratings. Actual partner feedback or truthful individual/Pending route and useful next step. Grown-up review; personal evidence is required.
Back to my workbook ↑

Curriculum & workbook reference

Computing for your homeschool day

Explore Trace numeric message sequences with this free Grade 8 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

Closed answers are checked in your browser. Drawings and written explanations 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 programme background, visit the Cambridge Lower Secondary Computing overview. PaxaKids provides independent original companion practice.

Book page references identify the related teaching topic. File-management and responsible-data preparation are original PaxaKids material; orientation or contents pages are not presented as teaching citations for those skills. The explanations, characters, programs and exercises here are original PaxaKids companion practice. Practical tasks require the appropriate editor and, where applicable, suitable equipment. A design or paper trace is not a verified hardware result. Only completed, reviewed lessons are listed.

Explore the Cambridge Lower Secondary Computing curriculum for programme background. PaxaKids is an independent learning resource.