GRADE 6 · COMPUTING · UNIT 1 · LESSON 1.10
Computational thinking and programming
Trace routines and shared state
Learn the idea, try your workbook and explain your thinking.
LET’S LOOK, THINK AND TRY
Trace routines and shared state
When a paper subroutine changes a shared variable, the main algorithm sees that new value after the call. Trace each call from its first instruction to its last, then return to the main sequence. Keep a separate record for each variable; a call does not automatically reset values.
- Trace routines and shared state.
- trace the supplied model step by step and justify my result.

Define once and call when needed
A subroutine is a named group of instructions. Defining it records what it does; calling it runs those instructions. Reusing a subroutine can make repeated work clearer. In these paper traces, finish the called instructions before returning to the next main step. Initialise each variable, then update it only when an executed instruction changes it. A broadcast sends an event; it is different from directly calling a custom block.
Work through the example: Trace a reusable pack step
These are paper pseudocode instructions. Pack changes Coins and then outputs it. The main algorithm starts at 1 and calls Pack twice.

Why this helps: A subroutine is a named group of instructions. Defining it records what it does; calling it runs those instructions. Reusing a subroutine can make repeated work clearer. In these paper traces, finish the called instructions before returning to the next main step. Initialise each variable, then update it only when an executed instruction changes it. A broadcast sends an event; it is different from directly calling a custom block.
Try it before the workbook
What happens after a paper routine finishes?
Use the explanation to choose a reason. This first workbook question helps you check that you are ready.
Explore the clues
Open one card at a time.
Remember the idea
A subroutine is a named group of instructions. Defining it records what it does; calling it runs those instructions. Reusing a subroutine can make repeated work clearer. In these paper traces, finish the called instructions before returning to the next main step. Initialise each variable, then update it only when an executed instruction changes it. A broadcast sends an event; it is different from directly calling a custom block.
Check your first try
Continue with the next main instruction
When a paper subroutine changes a shared variable, the main algorithm sees that new value after the call. Trace each call from its first instruction to its last, then return to the main sequence. Keep a separate record for each variable; a call does not automatically reset values.
Explain with evidence
A faulty routine is DEFINE Award {SET Score TO 0; CHANGE Score BY 2}. The main algorithm also sets Score to 0, calls Award twice and displays Score. The intended final score is 4.

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 actual records and labels to explain your answer.
Our Unit 1 learning path
- Lesson 1.1: Read and explain a flowchart
- Lesson 1.2: Trace branches and repeated steps
- Lesson 1.3: Build an animation from a plan
- Lesson 1.4: Test and repair a decision plan
- Lesson 1.5: Combine programming ideas
- Lesson 1.6: Reason about loops, text and time
- Lesson 1.7: Build a small dialogue program
- Lesson 1.8: Test a clock and improve its rules
- Lesson 1.9: Define and call reusable routines
- Lesson 1.10: Trace routines and shared state
- Lesson 1.11: Build a quiz with reusable feedback
- Lesson 1.12: Coordinate sprites and test reuse
- Lesson 1.13: Plan a program and its interface
- Lesson 1.14: Trace choices before programming
- Lesson 1.15: Build a one-round choice game
- Lesson 1.16: Test a plan and improve a prototype
- Lesson 1.17: Evaluate against clear success criteria
- Lesson 1.18: Choose a systematic range of test data
- Lesson 1.19: Build and test an input-checking loop
- Lesson 1.20: Repair, retest and report improvements
- Lesson 1.21: Connect device inputs, variables and outputs
- Lesson 1.22: Act out a variable-controlled game
- Lesson 1.23: Build a button-controlled higher-or-lower game
- Lesson 1.24: Test device state and improve feedback
- Lesson 1.25: Build and evaluate a two-level quiz
For grown-ups: using this lesson
Explore the explanation and model 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.
Opening or checking a page does not complete the lesson. Choose “Mark lesson finished” when ready. Optional account progress saves the selected grade, lesson position and completion across devices. Personal workbook responses remain in this tab; save your copy before leaving. Use fictional data and supervised devices; do not share passwords, contact details or real personal records.
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.5 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 happens after a paper routine finishes? b) Continue with the next main instruction
- Question 2: What should a state trace record? c) The current value after each relevant change
Worksheet 2
- Question 3: What is the first displayed Coins value? 4
- Question 4: What is the last displayed Coins value? 7
- Question 5: How many times does the CHANGE instruction run? 2
Worksheet 3
- Question 6: What is final Distance in Program A? 4
- Question 7: What is final Distance in Program B? 7
- Question 8: How many calls to Step does Program A make? 2
Worksheet 4
- Question 9: What numeric value does the sender finally display? 1
- Question 10: Which message finishes before that numeric output? c) Hi
- Question 11: Why is AND WAIT useful here? c) The sender needs the receiver to finish first
Worksheet 5
- Question 12: What is final Score? 10
- Question 13: What is final Lives? 1
- Question 14: How many calls to Award run? 2
Worksheet 6
- Question 15: Explain the actual result and write a repair that gives the intended result. Actual result2 because each call resets Score before adding2. Remove SET Score TO0 from Award; keep one reset in main before both calls. Then0 ->2 ->4. Accept an equivalent repair that keeps reusable awarding separate from initialisation. Grown-up review.
- Question 16: Give a fresh-run test and an additional call test, with expected values. Fresh run with two calls ->4 even if the old Score was nonzero. A third call after the two ->6 without another reset. Tests must check initialisation once and cumulative reuse. Grown-up review.
Curriculum & workbook reference
- Cambridge Primary Computing Learner’s Book 6 — pages 34–51
- PaxaKids Grade 6 Computing Lesson 1.10: Trace routines and shared state — pages 1–6
Computing for your homeschool day
Explore Sub-routines with this free Grade 6 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.
The book pages identify the related teaching or assessment. These explanations, projects, review activities and student workbooks are original PaxaKids companion materials. These activities include paper alternatives. No separate publisher Workbook or proprietary digital project files are needed.
