GRADE 8 · COMPUTING · UNIT 1 · LESSON 1.36
Computational thinking and programming
Use pi and investigate another mathematical feature
Read a little. Try the workbook. Check your answers. Choose one section below to get started.
LET’S TRACE, REASON AND TEST
Use pi and investigate another mathematical feature
Use library constants and functions according to the model. A circle's radius is half its diameter; area and circumference use different formulas and units. State the chosen approximation or library constant.
- Access math.pi and select correct formulas for radius or diameter inputs.
- Explain my method and support it with a labelled trace, example or test record.

Work through an example
With radius 3, area = pi × 3² = 9pi square units and circumference = 2 × pi × 3 = 6pi units. Using diameter 6 as the radius would be incorrect.
Try before your workbook
For radius 2, what are the area and circumference in terms of pi?
Explore the clues
Tap one card to find out more.
Understand the idea
Use library constants and functions according to the model. A circle's radius is half its diameter; area and circumference use different formulas and units. State the chosen approximation or library constant.
Concept to practise: Use pi and investigate another mathematical feature.
Work through an example
With radius 3, area = pi × 3² = 9pi square units and circumference = 2 × pi × 3 = 6pi units. Using diameter 6 as the radius would be incorrect.
Try before your workbook
For radius 2, what are the area and circumference in terms of pi?
Check my readiness thinking
Area is 4pi square units and circumference is 4pi units. They share a numerical coefficient here, but represent different quantities and units.
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.
Use pi as a numeric constant
Use radius and diameter carefully when calculating a circle’s area or circumference. The Python math guide documents the constant; the diagrams and formulas here identify the required measurement.
Distinguish radius, diameter and circumference

Read this model’s labels and values
Predict an original fixed-radius program
Original Paxa fixed-radius example
import math
radius = 3
area = radius * radius * math.pi
print("Area:", f"{area:.2f}")Compare a simple estimate with program precision
| Radius | Using 3.14 | Using math.pi |
|---|---|---|
| 2 | {'clue': 'Amount to two decimal places', 'prompt': 'Estimate for radius 2', 'answers': ['12.56']} | {'clue': 'Amount to two decimal places', 'prompt': 'Program area for radius 2', 'answers': ['12.57']} |
| 3 | {'clue': 'Amount to two decimal places', 'prompt': 'Estimate for radius 3', 'answers': ['28.26']} | {'clue': 'Amount to two decimal places', 'prompt': 'Program area for radius 3', 'answers': ['28.27']} |
| 5 | {'clue': 'Amount to two decimal places', 'prompt': 'Estimate for radius 5', 'answers': ['78.50']} | {'clue': 'Amount to two decimal places', 'prompt': 'Program area for radius 5', 'answers': ['78.54']} |
| 8 | {'clue': 'Amount to two decimal places', 'prompt': 'Estimate for radius 8', 'answers': ['200.96']} | {'clue': 'Amount to two decimal places', 'prompt': 'Program area for radius 8', 'answers': ['201.06']} |
Read a radius and report both measurements
Original Paxa radius-input example
import math
radius = float(input())
area = math.pi * radius * radius
circumference = 2 * math.pi * radius
print("Area:", f"{area:.2f}")
print("Circumference:", f"{circumference:.2f}")Test zero and a decimal radius
| Radius | Displayed area | Displayed circumference |
|---|---|---|
| 0 | {'clue': 'Amount to two decimal places', 'prompt': 'Area for input radius 0', 'answers': ['0.00']} | {'clue': 'Amount to two decimal places', 'prompt': 'Circumference for input radius 0', 'answers': ['0.00']} |
| 1 | {'clue': 'Amount to two decimal places', 'prompt': 'Area for input radius 1', 'answers': ['3.14']} | {'clue': 'Amount to two decimal places', 'prompt': 'Circumference for input radius 1', 'answers': ['6.28']} |
| 2.5 | {'clue': 'Amount to two decimal places', 'prompt': 'Area for input radius 2.5', 'answers': ['19.63']} | {'clue': 'Amount to two decimal places', 'prompt': 'Circumference for input radius 2.5', 'answers': ['15.71']} |
Choose radius or diameter, then area or circumference
Original Paxa circle-choice calculator
import math
measurement = input().strip().lower()
size = float(input())
calculation = input().strip().lower()
if measurement == "radius" or measurement == "diameter":
if measurement == "radius":
radius = size
else:
radius = size / 2
if calculation == "area":
result = math.pi * radius * radius
print("Area:", f"{result:.2f}")
elif calculation == "circumference":
result = 2 * math.pi * radius
print("Circumference:", f"{result:.2f}")
else:
print("Invalid calculation")
else:
print("Invalid measurement")Check all four valid choice combinations
| Measurement | Size | Calculation | Full printed output |
|---|---|---|---|
| radius | 3 | area | {'clue': 'Exact output', 'prompt': 'radius area output', 'answers': ['Area: 28.27']} |
| radius | 3 | circumference | {'clue': 'Exact output', 'prompt': 'radius circumference output', 'answers': ['Circumference: 18.85']} |
| diameter | 6 | area | {'clue': 'Exact output', 'prompt': 'diameter area output', 'answers': ['Area: 28.27']} |
| diameter | 6 | circumference | {'clue': 'Exact output', 'prompt': 'diameter circumference output', 'answers': ['Circumference: 18.85']} |
Investigate another documented math function
Original Paxa function-research starters
import math
print("Square root:", math.sqrt(81))
print("Absolute value:", math.fabs(-4.5))Connect the original curriculum math toolkit
Original curriculum module C06 math toolkit
import math
def circle_area(radius):
return math.pi * radius * radius
print("Enter a finite number and a nonnegative radius on separate lines.")
number = float(input())
radius = float(input())
print("Floor:", math.floor(number))
print("Ceiling:", math.ceil(number))
if radius < 0:
print("Radius must be nonnegative.")
else:
area = circle_area(radius)
circumference = 2 * math.pi * radius
print("Area:", round(area, 3))
print("Circumference:", round(circumference, 3))Trace the toolkit and its radius guard
| Output label | Printed numeric value |
|---|---|
| Floor: | {'clue': 'Exact value', 'prompt': 'Toolkit floor for -2.4', 'answers': ['-3']} |
| Ceiling: | {'clue': 'Exact value', 'prompt': 'Toolkit ceiling for -2.4', 'answers': ['-2']} |
| Area: | {'clue': 'Exact displayed value', 'prompt': 'Toolkit area for radius3', 'answers': ['28.274']} |
| Circumference: | {'clue': 'Exact displayed value', 'prompt': 'Toolkit circumference for radius3', 'answers': ['18.85']} |
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 13 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.3 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 13 worksheets
Worksheet 1
- Question 1: Which expression accesses the pi constant? math.pi
- Question 2: What is 3.14 in a manual circle calculation? an approximation to pi
Worksheet 2
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 3
- Question 3: Which module is imported? math
- Question 4: What number follows Area: in the shown output? 28.27
- Question 5: Does reading math.pi call a function? no, it reads a numeric constant
Worksheet 4
- Question 6: Estimate for radius 2 12.56
- Question 7: Program area for radius 2 12.57
- Question 8: Estimate for radius 3 28.26
- Question 9: Program area for radius 3 28.27
- Question 10: Estimate for radius 5 78.50
- Question 11: Program area for radius 5 78.54
- Question 12: Estimate for radius 8 200.96
- Question 13: Program area for radius 8 201.06
Worksheet 5
- Question 14: What Python type does radius store here? float / real
- Question 15: For radius 3, what number follows Circumference:? 18.85
- Question 16: Which formula gives the circumference? 2 * math.pi * radius
Worksheet 6
- Question 17: Area for input radius 0 0.00
- Question 18: Circumference for input radius 0 0.00
- Question 19: Area for input radius 1 3.14
- Question 20: Circumference for input radius 1 6.28
- Question 21: Area for input radius 2.5 19.63
- Question 22: Circumference for input radius 2.5 15.71
Worksheet 7
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 8
- Question 23: radius area output Area: 28.27
- Question 24: radius circumference output Circumference: 18.85
- Question 25: diameter area output Area: 28.27
- Question 26: diameter circumference output Circumference: 18.85
- Question 27: What happens for measurement width with any valid numeric size? Invalid measurement is printed
Worksheet 9
- Question 28: What value does math.sqrt(81) return here? 9.0 / 9
- Question 29: What value does math.fabs(-4.5) return? 4.5
Worksheet 10
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 11
- Question 30: Toolkit floor for -2.4 -3
- Question 31: Toolkit ceiling for -2.4 -2
- Question 32: Toolkit area for radius3 28.274
- Question 33: Toolkit circumference for radius3 18.85
- Question 34: If radius is -1, what does the guard do? prints Radius must be nonnegative. and skips circle calculations
Worksheet 12
- Question 35: Use pages 3–8 to predict the fixed-radius outputs, recreate the radius-input area/circumference version and make or adapt a calculator that accepts radius or diameter and a choice of area or circumference. Test all four page 8 combinations, radius zero, radius 2.5 and an invalid measurement/calculation choice, recording predictions and actual output or Pending. Identify the import, numeric pi constant, inputs and stored results; explain conversion and units. Compare the toolkit’s numeric rounding with fixed decimal formatting. Keep full code, tests, corrections and retests. Correct formulas: diameter = 2 * radius; area = math.pi * radius * radius; circumference = 2 * math.pi * radius. Diameter input converts to radius by dividing by 2 before either formula. Valid equal-size cases radius 3 and diameter 6 give Area: 28.27 or Circumference: 18.85. Radius zero gives 0.00 and 0.00; radius 2.5 gives 19.63 and 15.71 with two-decimal display. Unknown choices give Invalid measurement or Invalid calculation. math.pi is a float approximation, not callable; inputs/results typed and common length/square units explained. Toolkit round(value, 3) does not pad zeros, while :.2f fixes two displayed digits. Full source/predictions/actual or Pending and correction/retest evidence required. Grown-up review; personal evidence is required.
Worksheet 13
- Question 36: Choose a math function beyond floor and ceil, such as sqrt or fabs from page 9. Read its official documentation and record the source title, URL and actual date checked, or identify provided-source reading with independent search Pending. Explain its purpose, arguments, input restrictions and returned type in your own words. Write a complete import/call/store-or-print example and predict at least two valid cases before execution or Pending. Compare with a partner’s different function if available; otherwise compare the two supplied starter features individually and mark partner exchange Pending. Keep code, evidence, your contribution and one next step. One suitable documented math function beyond floor/ceil; for sqrt use nonnegative finite inputs such as 81 and 0, returning floats 9.0 and 0.0; for fabs use -4.5 and 0, returning floats 4.5 and 0.0. Other documented appropriate functions accepted. Correct import, argument, call and use of returned value; not pi described as callable. Primary source title/URL/date or provided-reading/Pending distinction, original explanation of purpose/domain/type, two predictions and actual/Pending, corrections/retests. Actual comparison with a different peer feature or truthful individual sqrt/fabs comparison, contribution and next step. No invented web visit, partner round or installation. Grown-up review; personal evidence is required.
Curriculum & workbook reference
- Cambridge Lower Secondary Computing Learner’s Book 8 — pages 142–144
- PaxaKids Grade 8 Computing Lesson 1.36: Use pi and investigate another mathematical feature — pages 1–13
Computing for your homeschool day
Explore Use pi and investigate another mathematical feature 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.
