GRADE 8 · COMPUTING · UNIT 1 · LESSON 1.32
Computational thinking and programming
Recall calls and trace return values
Read a little. Try the workbook. Check your answers. Choose one section below to get started.
LET’S TRACE, REASON AND TEST
Recall calls and trace return values
A function call runs a routine, and return passes a result back to its caller. Assigning or using that result is different from the routine merely printing a message. Trace the call and the return destination.
- Trace shape sub-routines and Python functions; show what a return supplies to the caller.
- Explain my method and support it with a labelled trace, example or test record.

Work through an example
If double(n) returns n × 2, then result = double(7) assigns 14 to result. Printing 14 inside a routine alone would not be the same as returning it.
Try before your workbook
If add_one(8) returns 9 but the caller ignores the result, has a caller variable automatically changed?
Explore the clues
Tap one card to find out more.
Understand the idea
A function call runs a routine, and return passes a result back to its caller. Assigning or using that result is different from the routine merely printing a message. Trace the call and the return destination.
Concept to practise: Recall calls and trace return values.
Work through an example
If double(n) returns n × 2, then result = double(7) assigns 14 to result. Printing 14 inside a routine alone would not be the same as returning it.
Try before your workbook
If add_one(8) returns 9 but the caller ignores the result, has a caller variable automatically changed?
Check my readiness thinking
No. The caller must assign or otherwise use the returned result. Track the return value separately from any displayed output.
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.
Call a named routine and resume the caller
A function can return a value for the caller to store, print or use in a calculation. Defining a function sets it up; its body runs when it is called. We will trace calls and returned values with complete original examples.
Follow a call and its returned value

Read this model’s labels and values
Trace definition, call and continuation
Original Paxa function-return program
def make_reply():
return "Ready"
print("Before")
reply = make_reply()
print(reply)
print("After")Select a shape-report sub-routine

Read this model’s labels and values
- Before
- start
- Start
- output
- OUTPUT Choose square or rectangle
- input
- INPUT shape
- Routes
- shape = "square"
- call
- square_report()
- shape = "rectangle"
- call
- rectangle_report()
- Otherwise
- OUTPUT "Invalid choice"
Read the two separately defined report routines

Read this model’s labels and values
Trace shape area and perimeter reports
| Shape and dimensions | Area | Perimeter |
|---|---|---|
| square, side 3 | {'clue': 'Exact value', 'prompt': 'Square side3 area', 'answers': ['9']} | {'clue': 'Exact value', 'prompt': 'Square side3 perimeter', 'answers': ['12']} |
| square, side 5 | {'clue': 'Exact value', 'prompt': 'Square side5 area', 'answers': ['25']} | {'clue': 'Exact value', 'prompt': 'Square side5 perimeter', 'answers': ['20']} |
| rectangle, length 8, width 3 | {'clue': 'Exact value', 'prompt': 'Rectangle8by3 area', 'answers': ['24']} | {'clue': 'Exact value', 'prompt': 'Rectangle8by3 perimeter', 'answers': ['22']} |
| rectangle, length 6, width 2 | {'clue': 'Exact value', 'prompt': 'Rectangle6by2 area', 'answers': ['12']} | {'clue': 'Exact value', 'prompt': 'Rectangle6by2 perimeter', 'answers': ['16']} |
Model a caller and a function with two roles
Swap roles and use the original question 9 + 8. Individuals can trace and explain both roles on paper; record any real paired round or mark it Pending in the final task.
Recognise valid Python definitions and calls
Original Paxa valid syntax
def read_colour():
colour = input()
return colour
chosen_colour = read_colour()Read two functions that return entered text
Original Paxa two-function return example
def read_code():
print("Enter a fictional code")
code = input()
return code
def read_colour():
print("Enter a colour")
colour = input()
return colour
print("Start")
mission_code = read_code()
print("Code:", mission_code)
chosen_colour = read_colour()
print("Colour:", chosen_colour)
print("End")Trace returned values and final output order
| Trace point | Stored value or printed line |
|---|---|
| First main-program output | {'clue': 'Exact line', 'prompt': 'First two-function output', 'answers': ['Start']} |
| Value returned by read_code() | {'clue': 'Text value', 'prompt': 'Returned mission code', 'answers': ['Orbit']} |
| Output after storing mission_code | {'clue': 'Exact line', 'prompt': 'Code report line', 'answers': ['Code: Orbit']} |
| Value returned by read_colour() | {'clue': 'Text value', 'prompt': 'Returned colour', 'answers': ['teal']} |
| Last main-program output | {'clue': 'Exact line', 'prompt': 'Final two-function output', 'answers': ['End']} |
Distinguish printing from returning
A: return a useful value
def get_word():
return "Ready"
result = get_word()
print(result)B: print inside the function
def show_word():
print("Ready")
result = show_word()
print(result)Check a call that is defined but never made
A: no call
def signal():
print("Inside")
print("Outside")B: one call
def signal():
print("Inside")
signal()
print("Outside")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.

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
- Lesson 1.1: Recall algorithms and representations
- Lesson 1.2: Purpose and conventions of pseudocode
- Lesson 1.3: Input, output and strings
- Lesson 1.4: Identifiers and assignment
- Lesson 1.5: Arithmetic and translation
- Lesson 1.6: Trace and review a sequence
- Lesson 1.7: Conditions and two-way flow
- Lesson 1.8: IF THEN and indentation
- Lesson 1.9: IF THEN ELSE and decision diagrams
- Lesson 1.10: Ordered ELSEIF and fallback ELSE
- Lesson 1.11: Match flowchart and pseudocode branches
- Lesson 1.12: AND, OR and NOT
- Lesson 1.13: Grouping, precedence and review
- Lesson 1.14: Why software searches
- Lesson 1.15: A successful linear search
- Lesson 1.16: An unsuccessful search and termination
- Lesson 1.17: Practise and communicate the search
- Lesson 1.18: Translate conditions into Python
- Lesson 1.19: One-branch IF programs
- Lesson 1.20: Two-way IF ELSE programs
- Lesson 1.21: Ordered ELIF choices
- Lesson 1.22: Ranges and independent decisions
- Lesson 1.23: Boolean operators in Python
- Lesson 1.24: Design and test recommendations
- Lesson 1.25: Trace, debug and reflect
- Lesson 1.26: Choose data types and recognise Boolean literals
- Lesson 1.27: Set and use Boolean flags
- Lesson 1.28: Explain and identify constants
- Lesson 1.29: Express constants in three algorithm forms
- Lesson 1.30: Use a fixed factor in a calculation
- Lesson 1.31: Cast to Boolean and validate an empty response
- Lesson 1.32: Recall calls and trace return values
- Lesson 1.33: Supply parameters and reuse library code
- Lesson 1.34: Choose and import libraries responsibly
- Lesson 1.35: Round with floor and ceiling
- Lesson 1.36: Use pi and investigate another mathematical feature
- Lesson 1.37: Generate random choices within bounds
- Lesson 1.38: Investigate random real values and review library use
- Lesson 1.39: Retrieve test tables and predict selection outcomes
- Lesson 1.40: Decompose everyday problems
- Lesson 1.41: Decompose programs and organise shared work
- Lesson 1.42: Develop through repeated build/test cycles
- Lesson 1.43: Predict and verify algorithm outcomes
- Lesson 1.44: Choose representative and boundary tests
- Lesson 1.45: Build, execute and review a test plan
- Lesson 1.46: Recall physical inputs and compare transmission media
- Lesson 1.47: Configure a radio group and agree a message scheme
- Lesson 1.48: Send and receive numbers and strings
- Lesson 1.49: Trace numeric message sequences
- Lesson 1.50: Transmit text and use received data in conditions
- Lesson 1.51: Diagnose and extend a message protocol
- Lesson 1.52: Review communication and evidence of testing
- Lesson 1.53: Project 1: Adventure story
- Lesson 1.54: Project 2: Fire, Water, Earth
- 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.
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 14 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.0 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 14 worksheets
Worksheet 1
- Question 1: What triggers execution of the defined function body? calling the function
- Question 2: Where does control resume after a normal completed call? in the caller after the call
Worksheet 2
- Question 3: What text is returned by make_reply()? Ready
- Question 4: Which caller variable receives that text? reply
Worksheet 3
- Question 5: What is the first printed line? Before
- Question 6: What is the second printed line? Ready
- Question 7: What is the third printed line? After
- Question 8: Does return "Ready" itself print Ready? no, the caller print displays the returned text
Worksheet 4
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 5
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 6
- Question 9: Square side3 area 9
- Question 10: Square side3 perimeter 12
- Question 11: Square side5 area 25
- Question 12: Square side5 perimeter 20
- Question 13: Rectangle8by3 area 24
- Question 14: Rectangle8by3 perimeter 22
- Question 15: Rectangle6by2 area 12
- Question 16: Rectangle6by2 perimeter 16
Worksheet 7
- Question 17: What value is returned for 9 + 8? 17
- Question 18: Who uses the returned value in a sentence in this model? the caller
- Question 19: Which is an honest record if no partner round occurred? an individual trace and paired activity marked Pending
Worksheet 8
- Question 20: Which is a valid function definition header? def read_colour():
- Question 21: Which line calls the defined function? chosen_colour = read_colour()
- Question 22: Which line belongs inside the function body? return colour, indented under def
Worksheet 9
- Question 23: Which caller variable stores the result of read_code()? mission_code
- Question 24: Which caller variable stores the result of read_colour()? chosen_colour
Worksheet 10
- Question 25: First two-function output Start
- Question 26: Returned mission code Orbit
- Question 27: Code report line Code: Orbit
- Question 28: Returned colour teal
- Question 29: Final two-function output End
Worksheet 11
- Question 30: How many output lines does A print? 1
- Question 31: What is B’s second printed line? None
- Question 32: Does a Python function without explicit return stop being a function? no, it returns None when it reaches the end
Worksheet 12
- Question 33: What is A’s only printed line? Outside
- Question 34: What is B’s first printed line? Inside
- Question 35: What is B’s second printed line? Outside
Worksheet 13
- Question 36: Identify the two called routine names on page 4. Trace the main flow and both page 5 reports for all four page 6 cases, then use the supplied complete shape_reports_paxa.py to check predictions if execution is available. Add an invalid choice triangle and explain why no dimension input is then read. Record exact printed messages and actual results or Pending. Annotate where control enters a routine and resumes the caller. Keep source, traces and tests; explain area/perimeter units and any correction or actual individual/partner work. Routine identifiers square_report and rectangle_report. Square sides3/5 -> Area:9/25 and Perimeter:12/20; rectangle8by3/6by2 -> Area:24/12 and Perimeter:22/16, with exact print spacing. Main first prints Choose square or rectangle. triangle -> Invalid choice, no dimension reads; chosen routine finishes and control returns to caller before program ends. Positive integer dimensions, common length units, area square units/perimeter length units. Full source/traces/predictions/actual or Pending and correction/retest, truthful work evidence. No shape hardware or pair activity inferred. Grown-up review; personal evidence is required.
Worksheet 14
- Question 37: Model both page 7 arithmetic questions as caller/function exchanges, swapping roles if a partner is available or tracing both roles individually. Record the returned value and the caller’s sentence for each; mark an unperformed paired round Pending. Then trace the complete page 9 program for fictional code Nova and colour amber, showing both returned values, caller assignments and every printed line. Run if available or mark execution Pending. Explain why return differs from print, using page 11 evidence, and state one correction or next step. Keep full records and source. Roleplay6*7 ->42 and9+8 ->17; caller uses each numeric result in a meaningful sentence. Actual swap/observations or honest individual trace with paired Pending. Two-function full output Start;Enter a fictional code;Code: Nova;Enter a colour;Colour: amber;End. Local code/colour returned as str and stored mission_code/chosen_colour. return sends value back; print displays output; print-only function implicitly returns None, demonstrated by page11B. Definition not execution, caller resumes, full traces/source/actual or Pending, correction/next step and truthful support/roles. Grown-up review; personal evidence is required.
Curriculum & workbook reference
- Cambridge Lower Secondary Computing Learner’s Book 8 — pages 125–131
- PaxaKids Grade 8 Computing Lesson 1.32: Recall calls and trace return values — pages 1–14
Computing for your homeschool day
Explore Recall calls and trace return values 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.
