GRADE 4 · COMPUTING · UNIT 1 · LESSON 1.22
Computational thinking and programming
Plan and record fair program tests
Compare an actual result with its expected result.
LET’S LOOK, THINK AND TRY
Plan and record fair program tests
Compare an actual result with its expected result.
- compare an actual result with its expected result
- keep starting conditions clear when testing

Explore the clues
Tap one card to find out more.
Notice the idea
Comments explain code to people; they do not run as program instructions. A useful test states a starting condition or input, the expected result and the result actually observed.
Work through an example
A target asks for three marks, but a fixed REPEAT 2 makes only two. Record the mismatch, repair the count and rerun that same test. A passing case does not prove every case is correct.
Talk and check
Trace the executable instructions. Check position, direction, pen state and input, then compare the complete output with the target.

Think it through with Paxa!
Use fictional examples and the supplied model. Ask a grown-up before using equipment or exploring an online service.
A paper prediction explains a model. A real program or device also needs supervised practical testing.
Our Unit 1 learning path
- Lesson 1.1: Discover instructions and loops
- Lesson 1.2: Trace and correct a route
- Lesson 1.3: Build a concise paper program
- Lesson 1.4: Apply, debug and review
- Lesson 1.5: Explore forever blocks
- Lesson 1.6: Predict outputs and solve number puzzles
- Lesson 1.7: Build a paper Scratch animation
- Lesson 1.8: Debug indefinite-loop puzzles
- Lesson 1.9: Explore count-controlled loops
- Lesson 1.10: Debug maze and nested-loop puzzles
- Lesson 1.11: Draw shapes with counted repeats
- Lesson 1.12: Solve count-controlled coding challenges
- Lesson 1.13: Discover input, processing and output
- Lesson 1.14: Plan programs using user inputs
- Lesson 1.15: Build and test input-controlled programs
- Lesson 1.16: Debug input-and-output challenges
- Lesson 1.17: Break a problem into smaller parts
- Lesson 1.18: Trace routines and their triggers
- Lesson 1.19: Build a program with shared routines
- Lesson 1.20: Debug and test decomposed programs
- Lesson 1.21: Use helpful code comments
- Lesson 1.22: Plan and record fair program tests
- Lesson 1.23: Debug counted drawing programs
- Lesson 1.24: Review, test and explain a solution
- Lesson 1.25: Explore a physical computing device
- Lesson 1.26: Use buttons to control LED output
- Lesson 1.27: Build a digital-pet algorithm
- Lesson 1.28: Debug physical-device programs
- Lesson 1.29: Build and test Paxa explorer
For grown-ups: using this lesson
Discuss the idea, let your child make a prediction, then check the evidence together. Drawings, explanations and practical skills need human feedback alongside the automatic score.
Choose “Mark lesson complete” when ready. Optional account progress saves lesson position and completion; save personal workbook responses before leaving.
2. Fill in your workbook
Read the instructions and use each worksheet’s own code, diagrams, tables and key. Choose answers, 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.6 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: For testA, write PASS or FAIL.
PASS / pass - Question 2: For testB, how many lines too many were actually drawn?
2 / two - Question 3: What does testC show?
This supplied test failed.
Worksheet 2
- Question 4: Which event should test the greeting?
flag click - Question 5: Which event should test the drawing routine?
space press - Question 6: Why test one script at a time first?
It helps locate which section fails.
Worksheet 3
- Question 7: How many sides should you check?
8 / eight - Question 8: How many degrees do all eight turns total?
360 / 360 degrees - Question 9: Which test is incomplete for this target?
Checking only that the first line is drawn.
Worksheet 4
- Question 10: Where does testA finish?
C3 / c3 - Question 11: Where does testB finish?
A1 / a1 - Question 12: Why can these results differ even with the same code?
different start headings
Worksheet 5
- Question 13: Which record supports the repair for both supplied inputs?
Input 2 gives 2 clones; input 4 gives 4 clones. - Question 14: What should you do with the previously failed test?
Run it again after the repair. - Question 15: Does one passing test prove every input will work?
No; other cases may still fail.
Worksheet 6
- Question 16: Write two test rows, each giving trigger and expected output.
Flag click -> Ready once. Space press -> one closed square, four sides and return to start. Accept clear equivalent test rows covering both triggers, not just one. - Question 17: If the space test draws only three sides, what should you check and do next?
Inspect DrawSquare repeat count/body against the four-side target, correct the bug, then rerun the failed space test and other relevant tests. Accept equivalent precise debugging steps.
Curriculum & workbook reference
- Cambridge Primary Computing Learner’s Book 4 — pages 74–84
- PaxaKids Grade 4 Computing Lesson 1.22: Plan and record fair program tests — pages 1–6
Computing for your homeschool day
Explore Creating good programming solutions with this free Grade 4 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 topic. The teaching, diagrams and worksheet activities are original PaxaKids learning materials. For curriculum background, visit the Cambridge Primary Computing overview.
