GRADE 9 · COMPUTING · UNIT 1 · LESSON 1.8

Computational thinking and programming

Testing

Read a little. Try the workbook. Check your answers. Choose one section below to get started.

16 fillable worksheet pagesRead at your own pace

LET’S LOOK, THINK AND TRY

Testing

I can…
  • Classify normal, extreme, boundary and invalid tests
  • Create expected-output test cases for numerical input

Predict the required result first

A test plan pairs an input with the result required by the specification and a reason for choosing that case. Compare the observed result with that prediction. A program can run without crashing and still contain a logic error. Do not describe a paper prediction as an executed software test.

Probe both sides of a limit

Normal values satisfy the rules; extreme values are the accepted endpoints. Boundary probes include values just inside and outside a limit. Invalid inputs break a type, format or range rule. A value can have more than one label. Select appropriate cases rather than assuming every program has the same kind of input.

Original PaxaKids learning scene for Testing. The scene supplies context, not assessed measurements or counts.
An original PaxaKids scene for this topic. Use the stated values and exact workbook diagrams for computing work.

Work through an original example

An original rule accepts whole numbers from 2 to 10 inclusive. Plan tests using 1, 2, 6, 10, 11 and the text "cat".

Work through the reasoning

Expect 1 and 11 to be rejected as out of range, 2 and 10 accepted as the extreme endpoints, and 6 accepted as a typical interior case. The text "cat" must be rejected as the wrong input type. Record what actually happens only after a run, then investigate differences from these expected results.

Try it before the workbook

For that rule, is 10 an accepted extreme or an invalid value?

Use the example to choose your first step. This short preparation question is separate from your workbook. Open the check clue when you are ready.

Explore the clues

Open one card at a time to review your thinking.

Remember the idea

A test plan pairs an input with the result required by the specification and a reason for choosing that case. Compare the observed result with that prediction. A program can run without crashing and still contain a logic error. Do not describe a paper prediction as an executed software test.

Check your first try

accepted extreme

The upper limit is inclusive, so 10 is valid and extreme. The immediately higher integer 11 tests the invalid side of the upper boundary.

Explain and check
  • Match exact code outputs, binary widths and stated units. Explain your method.
  • Check the question, rules, outputs and units. Explain why your method works.
Paxa the Fox

Think it through with Paxa!

Trace the stated rules and distinguish predictions from actual observations.

Original computing practice files

Optional small offline examples and fictional datasets, created for PaxaKids. They are supplementary practice, not publisher downloads or complete implementations of every workbook project. The page does not execute these files. Inspect code with a grown-up before using it in an approved offline environment; do not use real personal data.

Our Unit 1 learning path
  1. Lesson 1.1: Pseudocode
  2. Lesson 1.2: Iteration
  3. Lesson 1.3: Creating algorithms
  4. Lesson 1.4: Loops in text-based programming
  5. Lesson 1.5: Programming with data
  6. Lesson 1.6: Comparing algorithms
  7. Lesson 1.7: Searching algorithms
  8. Lesson 1.8: Testing
  9. Lesson 1.9: Physical computing
  10. Lesson 1.10: Word guess
  11. Lesson 1.11: Flowchart - Pseudocode - Program code
  12. Lesson 1.12: Original Paxa project: Revision challenge app
  13. Lesson 1.13: Check your progress
  14. Lesson 1.14: Computational thinking and programming - unit check
For grown-ups: using this lesson

Discuss the idea and worked example, 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. Accept a sound alternative method.

Opening or checking a worksheet does not complete a lesson. Choose “Mark lesson finished” when ready. Optional account progress saves the selected grade, lesson position and completion across devices. Personal worksheet responses stay in this tab; save your own copy before leaving.

2. Fill in your workbook

Use the original diagrams and stated conventions. Choose, write or draw on the pages, or use the larger Answer List controls. Code examples here are for tracing; this page does not execute them or connect to hardware. Use fictional data and approved supervised tools for project work.

Testing16 student pages · original artwork

Opening your PDF…

Swipe sideways across the worksheet on a small screen, or use “Answer list” for larger controls.

TAKE YOUR PRACTICE OFFLINE

3. Download the student worksheet

All 16 original A4 student pages, ready for pencil-and-paper practice. Choose Review Answers to check your work on this webpage.

Student worksheet only · PDF · 6.7 MiB · No answer key included

Download worksheet PDF ↓

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 16 worksheets

Worksheet 1

  1. Question 1: What should determine an expected result? The stated requirement, before running the test

Worksheet 2

  1. Question 2: Which statement about 100 is correct? It is valid extreme data and a boundary probe
  2. Question 3: Give the smallest valid score. 0

Worksheet 3

  1. Question 4: Just below the lower limit -1
  2. Question 5: At the lower accepted limit 0
  3. Question 6: Just above the lower limit 1
  4. Question 7: Just below the upper limit 99
  5. Question 8: At the upper accepted limit 100
  6. Question 9: Just above the upper limit 101
  7. Question 10: Which pair directly probes the upper valid/invalid boundary? 100 and 101

Worksheet 4

  1. Question 11: What does the first print line output? ACCEPT
  2. Question 12: What does the final print line output? INTEGER

Worksheet 5

  1. Question 13: Input "0" ACCEPT
  2. Question 14: Input "1" ACCEPT
  3. Question 15: Input "50" ACCEPT
  4. Question 16: Input "99" ACCEPT
  5. Question 17: Input "100" ACCEPT
  6. Question 18: Input "101" RANGE
  7. Question 19: Input "fifty" INTEGER
  8. Question 20: Input "-1" RANGE

Worksheet 6

  1. Question 21: You have not run the program. What belongs in observed output? Pending
  2. Question 22: What makes an executed test pass? The observed result matches the specified expected result

Worksheet 7

  1. Question 23: A program prints a wrong sum but completes. Which fault is most likely? Logic error
  2. Question 24: What is true of a script with an ordinary parsing syntax error? It must be corrected before that script can execute

Worksheet 8

  1. Question 25: Which is the most useful fault report? Input, expected result, actual result and program version

Worksheet 9

  1. Question 26: What is the first value added to total? 1
  2. Question 27: What is the second value added to total? 3
  3. Question 28: How many times does the loop body run? 3

Worksheet 10

  1. Question 29: Faulty final printed total 9
  2. Question 30: Required final total 15
  3. Question 31: Correct increment to visit every integer 1
  4. Question 32: Where does the trace first diverge from visiting 1, 2, 3, 4, 5? After the first update: count becomes 3 instead of 2

Worksheet 11

  1. Question 33: What does the corrected program print? 15
  2. Question 34: What is count after the final update? 6
  3. Question 35: Which record demonstrates an observed successful retest? An actual run of the corrected version outputs the expected 15

Worksheet 12

  1. Question 36: What does the first print line output? NO DIV
  2. Question 37: What does the second print line output? 0.0 / 0
  3. Question 38: Which extra input also needs the guard? Numerator 0, denominator 0

Worksheet 13

  1. Question 39: Undefined pint("Ready") NameError
  2. Question 40: values[3] for three items IndexError
  3. Question 41: int("fifty") without a handler ValueError
  4. Question 42: Which nonnegative index is the last valid one for this three-item list? 2
  5. Question 43: Why catch the specific expected conversion exception? To handle that failure clearly while leaving unrelated faults visible

Worksheet 14

  1. Question 44: A faulty score check rejects 100. After fixing it, what should you test? 100, then related cases such as 99, 101 and text
  2. Question 45: What does a passing selection of tests establish? Those tested cases matched their expected results

Worksheet 15

  1. Question 46: Draw an eight-row test plan with columns for input text, purpose or overlapping data labels, expected output and observed output. Use fifty as the nonnumeric text. State the program version. Complete observed outputs only from actual execution; otherwise write Pending. Explain why both valid extremes and adjacent invalid values matter. Required rows and expected outputs: "-1" -> RANGE; "0" -> ACCEPT; "1" -> ACCEPT; "50" -> ACCEPT; "99" -> ACCEPT; "100" -> ACCEPT; "101" -> RANGE; "fifty" -> INTEGER. Order may vary. 0 and 100 are valid extremes and boundary values; -1 and 101 are invalid values directly across the lower and upper boundaries; 1 and 99 are valid near-limit probes; 50 is an interior normal case; fifty checks failed conversion. Categories can overlap. Include a version identifier and actual pupil results only when execution occurred; otherwise Pending in all observed cells. A supplied plan or paper trace must not be represented as an actual run. Explain that inclusive endpoints and the immediately rejected neighbours catch off-by-one mistakes. Accept an equivalent clear table and explanation. Grown-up review; discuss your evidence and reasoning.

Worksheet 16

  1. Question 47: Identify the error type and first wrong counter update. Explain the visited values and final total before and after the correction. Write a clear correction log with expected result, observed result or Pending, version and retest status. Give a related test you would also repeat and explain the limit of a successful retest. Logic error: after adding 1, count + 2 changes count to 3 instead of 2. Faulty visited values are 1, 3, 5, running totals 1, 4, 9, final count 7 and printed total 9. Correct count + 1 visits 1, 2, 3, 4, 5, totals 1, 3, 6, 10, 15, final count 6 and output 15. Identify versions such as faulty-v1 and corrected-v2; required result is 15. Actual observed 9/15 may be recorded only if the learner ran them; otherwise record paper prediction and execution Pending. A successful actual retest has observed corrected output 15 matching expected 15. As a related regression test, check a one-iteration variant with upper limit 1 expecting 1, or another clearly specified nearby loop variant with an independently calculated sum. Passing these cases does not prove every possible loop or input correct. Accept equivalent evidence-based explanation and genuine recorded results. Grown-up review; discuss your evidence and reasoning.
Back to my workbook ↑

Curriculum & workbook reference

Computing for your homeschool day

Explore Testing with this free Grade 9 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.

The original practice follows the source topic teaching.

The page references identify the reviewed actual supplied book teaching and related practice. Only the cited Learner’s Book teaching pages are listed here. No matching publisher Workbook 9 was supplied or cited. The original PaxaKids workbook is the student download; no textbook scan is published. Explanations, worked models and student workbooks here are original PaxaKids companion material.

The source topic number is preserved.