GRADE 7 · COMPUTING · UNIT 2 · LESSON 2.10
Decomposing problems: Creating a smart solution
Effective testing
Read a little. Try the workbook. Check your answers. Choose one section below to get started.
LET’S TRACE, REASON AND TEST
Effective testing
A test plan lists inputs and expected outputs before observing actual outcomes. Include ordinary values and values on both sides of a decision boundary. Keep a paper trace, simulator result and physical-device result clearly distinguished; each supports a different claim.
- Predict expected outputs for test inputs on both sides of and at a threshold.
- Record actual behaviour and pass/fail outcomes in a test plan.

Explore the clues
Tap one card to find out more.
Understand the idea
A test plan lists inputs and expected outputs before observing actual outcomes. Include ordinary values and values on both sides of a decision boundary. Keep a paper trace, simulator result and physical-device result clearly distinguished; each supports a different claim.
Concept to practise: Effective testing.
Work through an example
For an alarm condition level <= 10, readings 0, 9 and 10 should activate it, while 11 should not. Testing only 0 and 150 would miss some boundary mistakes. Record actual results after the chosen test.
Try before your workbook
Choose three nearby readings that test the boundary of level <= 10 and state their expected outputs.
Check my readiness thinking
Use 9, 10 and 11. The expected outputs are ON, ON and OFF. Compare actual results with these expectations; do not invent a hardware observation when only a trace was completed.
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.
Turn a prediction into a useful test
Maya writes the expected result before running the program. Sami records what actually happens. A test passes when the observed result matches the requirement for the tested input and revision.
The intended light-alarm rule
Decision: level <= 10?
True branch
- Alarm ON
False branch
- Alarm OFF
Use a failed result to investigate
| Record part | Example meaning |
|---|---|
| Expected | ON, from the intended <= 10 rule. |
| Actual | OFF, observed for the tested revision. |
| Result | Fail: observed output differs. |
| Next action | Inspect the comparison, repair, retest. |
An original starter with a boundary fault
ORIGINAL TESTABLE STARTER
from microbit import *
import music
TEST_LEVEL = None
while True:
if TEST_LEVEL is None:
level = display.read_light_level()
else:
level = TEST_LEVEL
if level < 10:
music.pitch(880, duration=-1, wait=False)
else:
music.stop()
sleep(100)Run controlled and measured tests separately
- Record input, expected output and source revision
- Save and send that exact revision to the board
- Observe output; record Actual and Pass/Fail
- Repair a failed requirement and save a new revision
- Retest; restore None for real sensor measurements

Try one step with Paxa!
Use the API for the chosen editor. Label paper traces, simulator runs and physical tests accurately; ask a grown-up before connecting equipment. Save personal responses before leaving.
Our Unit 2 learning path
- Lesson 2.1: All about software
- Lesson 2.2: Introducing the micro:bit
- Lesson 2.3: Using Python with the micro:bit
- Lesson 2.4: The micro:bit Python environment
- Lesson 2.5: Correcting errors using a flowchart
- Lesson 2.6: Using sensors in programming
- Lesson 2.7: Flowcharts for algorithm planning
- Lesson 2.8: Algorithmic solutions and data types
- Lesson 2.9: Planning a smart solution
- Lesson 2.10: Effective testing
- Lesson 2.11: Evaluating a program
- Lesson 2.12: Testing accelerometer gestures
- Lesson 2.13: Protecting a museum crown
- Lesson 2.14: Final project
- Lesson 2.15: Evaluation
- Lesson 2.16: What can you do?
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 the 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 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.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 8 worksheets
Worksheet 1
- Question 1: When should the expected result be decided? from the requirement before the run
- Question 2: What makes an actual result useful evidence? an observed output tied to an input and revision
Worksheet 2
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 3
- Question 3: Light level 0: expected alarm output? ON / on
- Question 4: Light level 150: expected alarm output? OFF / off
- Question 5: Light level 10: expected alarm output? ON / on
- Question 6: Light level 9: expected alarm output? ON / on
- Question 7: Light level 80: expected alarm output? OFF / off
Worksheet 4
- Question 8: What is the result of the example test? Fail
- Question 9: Which set best checks this boundary? 9, 10 and 11
Worksheet 5
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 6
- Question 10: Does TEST_LEVEL = 10 prove the physical sensor measured 10? No; the program substitutes a controlled input.
Worksheet 7
- Question 11: Use rows 1–6 for controlled readings 0, 150, 10, 9, 80 and 11, in that order. Trace the intended chart to fill Expected first. Test the starter, record Actual and Pass/Fail, then name its revision. Record repairs and retests below; keep unperformed tests marked pending. Expected rows: ON, OFF, ON, ON, OFF, OFF. Original faulty <10 gives ON, OFF, OFF, ON, OFF, OFF; boundary10 fails. Actual observations only from identified controlled-input program runs, not inferred from the key. Six-row table may hold baseline; use supplied CSV or additional labelled retest entries for corrected revision. Change to <=10 and retest; corrected expected values all match. Include method, revision and actual observations. If unavailable, mark pending rather than invent results. Controlled TEST_LEVEL substitution is not physical sensing. No numeric score. Grown-up review; personal evidence is required.
Worksheet 8
- Question 12: Identify the comparison fault and justify its correction. Record the retest at 10 and at least one input on each side. Then use TEST_LEVEL = None to test measured light in active and inactive conditions; give actual readings, alarm observations and any limitation. Compare findings with your partner and explain the difference between a controlled-input test and a physical sensor test. Repair 10 music.stop/OFF. Cover/uncover may not achieve exact values; adjust normal conditions and record actual measured values rather than invent0/150/etc. Require physical active/inactive evidence for board assessment; if unavailable or branch not reached mark pending. Compare with partner and record finding, or honest self-check. Controlled substitution tests logic without proving sensor reading; measured mode exercises sensor response. No numeric scoring. Grown-up review; personal evidence is required.
Curriculum & workbook reference
- Cambridge Lower Secondary Computing 7 Student’s Book — pages 73–74
- PaxaKids Grade 7 Computing Lesson 2.10: Effective testing — pages 1–8
Computing for your homeschool day
Explore Effective testing with this free Grade 7 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.
For programme background, visit the Cambridge Lower Secondary Computing overview. PaxaKids provides independent original companion practice.
The book pages identify the related teaching topic. 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.
