GRADE 8 · COMPUTING · UNIT 1 · LESSON 1.6

Computational thinking and programming

Trace and review a sequence

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

Topic 1.6 · Trace and review a sequence8 fillable worksheet pagesRead at your own pace

LET’S TRACE, REASON AND TEST

Trace and review a sequence

A trace records values after each executed instruction. Keep unchanged values unchanged, and check output against the current value rather than an earlier value. Use the trace to explain any correction.

Today’s two goals
  • Record each executed statement and justify final values without skipping repeated assignments.
  • Explain my method and support it with a labelled trace, example or test record.
Original PaxaKids illustration for Trace and review a sequence. 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

Start x at 4, assign x = x + 3, then y = x × 2. The successive values are x = 4, x = 7, y = 14, so OUTPUT y gives 14.

Try before your workbook

Trace x = 2, x = x + 5, then OUTPUT x × 3. What is displayed?

Explore the clues

Tap one card to find out more.

Understand the idea

A trace records values after each executed instruction. Keep unchanged values unchanged, and check output against the current value rather than an earlier value. Use the trace to explain any correction.

Concept to practise: Trace and review a sequence.

Work through an example

Start x at 4, assign x = x + 3, then y = x × 2. The successive values are x = 4, x = 7, y = 14, so OUTPUT y gives 14.

Try before your workbook

Trace x = 2, x = x + 5, then OUTPUT x × 3. What is displayed?

Check my readiness thinking

The updated x is 7, so the displayed result is 21. Writing the intermediate value shows why the original 2 is no longer used.

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 every statement, including repeated assignments

A trace records the state after each executed statement. Cover later lines if needed and reveal one at a time. When a value is unchanged, carry it forward; when a name is not yet assigned, record that fact.

A trace is a manual check of a stated algorithm. Keep it distinct from a computer run, and compare it with the exact source revision.

Read the complete original counter plan

Receive the four inputs in this order: 4, 6, 3, 7. INPUT stores its value in the stated destination. The assignment symbol is <-. The final OUTPUT uses one space between its two parts and displays one line.
ORIGINAL EIGHT-STATEMENT COUNTER PLAN
INPUT start_total
INPUT stage1
start_total <- start_total + stage1
INPUT stage2
start_total <- start_total + stage2
INPUT stage3
start_total <- start_total + stage3
OUTPUT "Counter total:", start_total

Complete the state after statements 1–4

Complete the state after statements 1–4 — original model
After statementstart_totalstage1stage2stage3
1. INPUT start_total{'clue': 'Value', 'prompt': 'After statement 1: start_total', 'answers': ['4']}unassignedunassignedunassigned
2. INPUT stage1{'clue': 'Value', 'prompt': 'After statement 2: start_total', 'answers': ['4']}{'clue': 'Value', 'prompt': 'After statement 2: stage1', 'answers': ['6']}unassignedunassigned
3. start_total <- start_total + stage1{'clue': 'Value', 'prompt': 'After statement 3: start_total', 'answers': ['10']}{'clue': 'Value', 'prompt': 'After statement 3: stage1', 'answers': ['6']}unassignedunassigned
4. INPUT stage2{'clue': 'Value', 'prompt': 'After statement 4: start_total', 'answers': ['10']}{'clue': 'Value', 'prompt': 'After statement 4: stage1', 'answers': ['6']}{'clue': 'Value', 'prompt': 'After statement 4: stage2', 'answers': ['3']}unassigned

Complete the state after statements 5–8

Complete the state after statements 5–8 — original model
After statementstart_totalstage1stage2stage3
5. start_total <- start_total + stage2{'clue': 'Value', 'prompt': 'After statement 5: start_total', 'answers': ['13']}{'clue': 'Value', 'prompt': 'After statement 5: stage1', 'answers': ['6']}{'clue': 'Value', 'prompt': 'After statement 5: stage2', 'answers': ['3']}unassigned
6. INPUT stage3{'clue': 'Value', 'prompt': 'After statement 6: start_total', 'answers': ['13']}{'clue': 'Value', 'prompt': 'After statement 6: stage1', 'answers': ['6']}{'clue': 'Value', 'prompt': 'After statement 6: stage2', 'answers': ['3']}{'clue': 'Value', 'prompt': 'After statement 6: stage3', 'answers': ['7']}
7. start_total <- start_total + stage3{'clue': 'Value', 'prompt': 'After statement 7: start_total', 'answers': ['20']}{'clue': 'Value', 'prompt': 'After statement 7: stage1', 'answers': ['6']}{'clue': 'Value', 'prompt': 'After statement 7: stage2', 'answers': ['3']}{'clue': 'Value', 'prompt': 'After statement 7: stage3', 'answers': ['7']}
8. OUTPUT "Counter total:", start_total{'clue': 'Value', 'prompt': 'After statement 8: start_total', 'answers': ['20']}{'clue': 'Value', 'prompt': 'After statement 8: stage1', 'answers': ['6']}{'clue': 'Value', 'prompt': 'After statement 8: stage2', 'answers': ['3']}{'clue': 'Value', 'prompt': 'After statement 8: stage3', 'answers': ['7']}

Review assignment, output and language independence

ORIGINAL REVIEW PLAN
first <- 7
second <- 4
third <- first + second
first <- 30
OUTPUT third

Use the six skill areas to review your evidence

Use the six skill areas to review your evidence — original model
IDSkill to demonstrate
1Explain the purpose of pseudocode.
2Distinguish agreed conventions from universal rules.
3Follow a complete pseudocode sequence in order.
4Trace named inputs and exact outputs.
5Track variable assignments and replacements.
6Evaluate arithmetic expressions using their stated order.

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 and review a sequence8 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 · 7.9 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 is a reliable way to follow a sequence? execute and record each statement in its written order
  2. Question 2: How should a not-yet-assigned variable be recorded? unassigned until its first value is received or assigned

Worksheet 2

  1. Question 3: How many input statements are executed? 4
  2. Question 4: How many output messages are displayed? 1

Worksheet 3

  1. Question 5: After statement 1: start_total 4
  2. Question 6: After statement 2: start_total 4
  3. Question 7: After statement 2: stage1 6
  4. Question 8: After statement 3: start_total 10
  5. Question 9: After statement 3: stage1 6
  6. Question 10: After statement 4: start_total 10
  7. Question 11: After statement 4: stage1 6
  8. Question 12: After statement 4: stage2 3

Worksheet 4

  1. Question 13: After statement 5: start_total 13
  2. Question 14: After statement 5: stage1 6
  3. Question 15: After statement 5: stage2 3
  4. Question 16: After statement 6: start_total 13
  5. Question 17: After statement 6: stage1 6
  6. Question 18: After statement 6: stage2 3
  7. Question 19: After statement 6: stage3 7
  8. Question 20: After statement 7: start_total 20
  9. Question 21: After statement 7: stage1 6
  10. Question 22: After statement 7: stage2 3
  11. Question 23: After statement 7: stage3 7
  12. Question 24: After statement 8: start_total 20
  13. Question 25: After statement 8: stage1 6
  14. Question 26: After statement 8: stage2 3
  15. Question 27: After statement 8: stage3 7
  16. Question 28: Which final message follows from this trace? Counter total: 20

Worksheet 5

  1. Question 29: What value does this plan display as written? 11
  2. Question 30: Which command displays a result under our stated convention? OUTPUT
  3. Question 31: Why can pseudocode help a team using different programming languages? it communicates the algorithm without requiring one language’s exact syntax

Worksheet 6

  1. Question 32: Evaluate 7 * 3. 21
  2. Question 33: Evaluate (24 / 3) + 4. 12 / 12.0
  3. Question 34: Evaluate 16 * 2 - 5. 27

Worksheet 7

  1. Question 35: Make a full state trace for the page 5 review plan, including each assignment and the output. Explain why third keeps its earlier value when first changes. Now use a new requirement: the output must give the sum of the latest first and second values. Show the extra assignment needed, predict the changed output and check it by a run or manual trace. Identify the source revision, method and any device or peer step still Pending. Original trace: first 7; second 4; third 11; first changes to 30 while second stays 4 and third stays 11; OUTPUT third gives 11. Under the explicitly changed requirement, add third <- first + second after first <- 30 and before OUTPUT, or equivalent correctly placed recalculation; changed third/output 34. Python translation uses = and print. Require complete state history with unassigned entries before assignment and unchanged values retained. Explain that the earlier version is traced as written; do not fabricate a syntax error. Actual run/trace method and revision identified, pending steps honest. No numeric score. Grown-up review; personal evidence is required.

Worksheet 8

  1. Question 36: For each skill ID 1–6 on page 6, choose Ready, Practising or Pending, cite exact evidence from your work and state the next action. In the notes, select one learning need and explain how you will check improvement. Use actual trace, code or discussion evidence; do not invent completed practical or peer work. All six source summary areas retained through original paraphrases, in order. Require an honest nonnumeric status, relevant exact evidence and a next action for each. Need and success check should be specific rather than confidence alone. Accept correct existing work, a corrected example or a stated Pending evidence need; no forced invented error or practical result. Keep pseudocode conventions and Python syntax distinct and preserve assignment/arithmetic reasoning. Skill IDs are identifiers, not marks. Grown-up review; personal evidence is required.
Back to my workbook ↑

Curriculum & workbook reference

Computing for your homeschool day

Explore Trace and review a sequence 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.