GRADE 8 · COMPUTING · UNIT 1 · LESSON 1.42

Computational thinking and programming

Develop through repeated build/test cycles

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

Topic 1.42 · Develop through repeated build/test cycles10 fillable worksheet pagesRead at your own pace

LET’S TRACE, REASON AND TEST

Develop through repeated build/test cycles

Software development repeats planning, building, testing and review. A revision should address an identified requirement or observed problem and be tested again. Keep an earlier working version when changing behaviour.

Today’s two goals
  • Plan and record a sequence of small working increments, correcting failures before adding features.
  • Explain my method and support it with a labelled trace, example or test record.
Original PaxaKids illustration for Develop through repeated build/test cycles. Use the supplied program and data models for precise workbook facts.
An original PaxaKids workbook scene. Use the supplied programs and data for precise workbook facts.

Work through an example

A first version rejects a valid boundary. Record the failing case, correct the comparison, rerun that case and run nearby cases to look for new mistakes. Keep both versions and the test record.

Try before your workbook

After correcting one failing case, why should you rerun cases that used to pass?

Explore the clues

Tap one card to find out more.

Understand the idea

Software development repeats planning, building, testing and review. A revision should address an identified requirement or observed problem and be tested again. Keep an earlier working version when changing behaviour.

Concept to practise: Develop through repeated build/test cycles.

Work through an example

A first version rejects a valid boundary. Record the failing case, correct the comparison, rerun that case and run nearby cases to look for new mistakes. Keep both versions and the test record.

Try before your workbook

After correcting one failing case, why should you rerun cases that used to pass?

Check my readiness thinking

A change can affect other paths. Retesting checks for regressions rather than assuming the repair changed only one outcome.

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.

Develop a small working part, then test it

Iteration means repetition. Iterative development builds a program through repeated cycles of small changes, tests and corrections. Keep a working version, add a manageable feature and check it before adding more.

A failing test is useful evidence: investigate, correct the relevant part and retest. Once a part behaves as required, move to the next increment. Keep earlier checks so added features do not silently break existing behaviour.

Follow the development and correction cycle

Each test has a justified prediction and an observed result, or Pending if unrun. Matching selected tests supports those cases. At Complete?, review the agreed requirements and relevant earlier checks before finishing.
Follow the development and correction cycle — original labelled workbook model. The following text version gives its labels and values.
Follow the development and correction cycle · original PaxaKids model.
Read this model’s labels and values

Agree the Fire, Water, Earth game rules

Two players each choose fire, water or earth. Fire beats earth; earth beats water; water beats fire. Equal choices draw. This version uses one round, fictional names and valid lowercase choices. Choose suitable available Python, Scratch, micro:bit tools or interactive presentation software; practical execution is not assumed.
Agree the Fire, Water, Earth game rules — original model
First choiceSecond choiceRound result
fireearthFirst player wins
earthwaterFirst player wins
waterfireFirst player wins
any allowed choicesame choiceDraw

Increment 1: read and report two names

First test the name input and display alone. These are fictional display names, not required personal information. Save this working version before extending it.
Original Paxa increment 1
first_name = input("First name: ")
second_name = input("Second name: ")
print("Players:", first_name, "and", second_name)

Increment 2: collect and display both choices

Keep the working name feature and add two choice inputs and their display. For now use valid lowercase fire, water or earth. This increment deliberately reports choices without deciding a winner yet.
Original Paxa increment 2
first_name = input("First name: ")
second_name = input("Second name: ")
print("Players:", first_name, "and", second_name)
first = input("First choice: ")
second = input("Second choice: ")
print("First chose:", first)
print("Second chose:", second)

Increment 3: integrate the result decision

This complete version keeps the earlier displays and adds one result. Use valid lowercase choices only. Parentheses let the compound condition continue across lines. A winning result names the winner; equal choices print Draw.
Original Paxa complete one-round game
first_name = input("First name: ")
second_name = input("Second name: ")
print("Players:", first_name, "and", second_name)
first = input("First choice: ")
second = input("Second choice: ")
print("First chose:", first)
print("Second chose:", second)
if first == second:
    print("Draw")
elif ((first == "fire" and second == "earth")
      or (first == "earth" and second == "water")
      or (first == "water" and second == "fire")):
    print("Winner:", first_name)
else:
    print("Winner:", second_name)

Plan all nine allowed choice combinations

Use First for the first player winning, Second for the second player winning, or Draw. The row names give the first player’s choice; column names give the second player’s choice. These are predictions, not execution evidence.
Plan all nine allowed choice combinations — original model
First / secondfirewaterearth
fire{'clue': 'Result', 'prompt': 'Outcome fire versus fire', 'answers': ['Draw']}{'clue': 'Result', 'prompt': 'Outcome fire versus water', 'answers': ['Second']}{'clue': 'Result', 'prompt': 'Outcome fire versus earth', 'answers': ['First']}
water{'clue': 'Result', 'prompt': 'Outcome water versus fire', 'answers': ['First']}{'clue': 'Result', 'prompt': 'Outcome water versus water', 'answers': ['Draw']}{'clue': 'Result', 'prompt': 'Outcome water versus earth', 'answers': ['Second']}
earth{'clue': 'Result', 'prompt': 'Outcome earth versus fire', 'answers': ['Second']}{'clue': 'Result', 'prompt': 'Outcome earth versus water', 'answers': ['First']}{'clue': 'Result', 'prompt': 'Outcome earth versus earth', 'answers': ['Draw']}

Read a supplied development record

This is a simulated example log showing a development approach, not a learner execution record. It keeps a failure and its retest visible. A correction is followed by another test before the next feature is added.
Read a supplied development record — original model
IncrementSupplied example observationNext action
NamesName display matchesKeep version; add choices
ChoicesSecond choice is not displayedCorrect choice display
Choices retestBoth displays now matchKeep version; add result
ResultTies and winner directions match tested casesReview agreed requirements

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.

Paxa the Fox

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
  1. Lesson 1.1: Recall algorithms and representations
  2. Lesson 1.2: Purpose and conventions of pseudocode
  3. Lesson 1.3: Input, output and strings
  4. Lesson 1.4: Identifiers and assignment
  5. Lesson 1.5: Arithmetic and translation
  6. Lesson 1.6: Trace and review a sequence
  7. Lesson 1.7: Conditions and two-way flow
  8. Lesson 1.8: IF THEN and indentation
  9. Lesson 1.9: IF THEN ELSE and decision diagrams
  10. Lesson 1.10: Ordered ELSEIF and fallback ELSE
  11. Lesson 1.11: Match flowchart and pseudocode branches
  12. Lesson 1.12: AND, OR and NOT
  13. Lesson 1.13: Grouping, precedence and review
  14. Lesson 1.14: Why software searches
  15. Lesson 1.15: A successful linear search
  16. Lesson 1.16: An unsuccessful search and termination
  17. Lesson 1.17: Practise and communicate the search
  18. Lesson 1.18: Translate conditions into Python
  19. Lesson 1.19: One-branch IF programs
  20. Lesson 1.20: Two-way IF ELSE programs
  21. Lesson 1.21: Ordered ELIF choices
  22. Lesson 1.22: Ranges and independent decisions
  23. Lesson 1.23: Boolean operators in Python
  24. Lesson 1.24: Design and test recommendations
  25. Lesson 1.25: Trace, debug and reflect
  26. Lesson 1.26: Choose data types and recognise Boolean literals
  27. Lesson 1.27: Set and use Boolean flags
  28. Lesson 1.28: Explain and identify constants
  29. Lesson 1.29: Express constants in three algorithm forms
  30. Lesson 1.30: Use a fixed factor in a calculation
  31. Lesson 1.31: Cast to Boolean and validate an empty response
  32. Lesson 1.32: Recall calls and trace return values
  33. Lesson 1.33: Supply parameters and reuse library code
  34. Lesson 1.34: Choose and import libraries responsibly
  35. Lesson 1.35: Round with floor and ceiling
  36. Lesson 1.36: Use pi and investigate another mathematical feature
  37. Lesson 1.37: Generate random choices within bounds
  38. Lesson 1.38: Investigate random real values and review library use
  39. Lesson 1.39: Retrieve test tables and predict selection outcomes
  40. Lesson 1.40: Decompose everyday problems
  41. Lesson 1.41: Decompose programs and organise shared work
  42. Lesson 1.42: Develop through repeated build/test cycles
  43. Lesson 1.43: Predict and verify algorithm outcomes
  44. Lesson 1.44: Choose representative and boundary tests
  45. Lesson 1.45: Build, execute and review a test plan
  46. Lesson 1.46: Recall physical inputs and compare transmission media
  47. Lesson 1.47: Configure a radio group and agree a message scheme
  48. Lesson 1.48: Send and receive numbers and strings
  49. Lesson 1.49: Trace numeric message sequences
  50. Lesson 1.50: Transmit text and use received data in conditions
  51. Lesson 1.51: Diagnose and extend a message protocol
  52. Lesson 1.52: Review communication and evidence of testing
  53. Lesson 1.53: Project 1: Adventure story
  54. Lesson 1.54: Project 2: Fire, Water, Earth
  55. 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.

Develop through repeated build/test cycles10 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 10 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

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

Worksheet 1

  1. Question 1: What does iterative mean here? repeating a process
  2. Question 2: What should follow a failed test during development? investigate, correct and retest the relevant part

Worksheet 2

This page introduces the activity. There are no marked responses on this sheet.

Worksheet 3

  1. Question 3: If both choices are earth, what is the final result? Draw
  2. Question 4: Which requirement is outside this one-round version? keeping a multi-round score

Worksheet 4

  1. Question 5: For inputs Maya then Sami, write the full printed line beginning Players:. Players: Maya and Sami
  2. Question 6: What should happen before adding the choice feature? check the name-input behaviour and keep the working version

Worksheet 5

  1. Question 7: For first choice fire, write the full First chose: line. First chose: fire
  2. Question 8: Which behaviour is still to be added after this increment? deciding and reporting the round result

Worksheet 6

  1. Question 9: Why check an earlier name-display case after this addition? to check that the new code has not broken earlier behaviour

Worksheet 7

  1. Question 10: Outcome fire versus fire Draw
  2. Question 11: Outcome fire versus water Second
  3. Question 12: Outcome fire versus earth First
  4. Question 13: Outcome water versus fire First
  5. Question 14: Outcome water versus water Draw
  6. Question 15: Outcome water versus earth Second
  7. Question 16: Outcome earth versus fire Second
  8. Question 17: Outcome earth versus water First
  9. Question 18: Outcome earth versus earth Draw
  10. Question 19: What is missing if only fire against earth is tested? ties and the other choice combinations
  11. Question 20: Do these valid-choice tests establish how unexpected text is handled? no, unexpected text needs its own requirement and tests

Worksheet 8

  1. Question 21: What should happen after the missing second display is found? correct it and retest before adding the result feature
  2. Question 22: What makes this record evidence of iteration? it records a change, test, correction and retest

Worksheet 9

  1. Question 23: Choose suitable available technology and develop the complete page 3 one-round game in small increments. Use pages 4–6 as Python support or create equivalent behaviour in your chosen tool. Keep each saved version and a brief record of its feature, predicted tests, actual results or Pending, corrections and retests. Test both players winning and ties using the nine page 7 combinations, and recheck earlier input/display behaviour. Work with a partner if available or individually, stating your contribution and any unperformed exchange. Suitable justified technology supports two fictional names, two allowed choices, correct complete one-round selection and outputs. Meaningful increments such as names, choices, result, with each saved source/artifact and predicted/actual-or-Pending checks; failures investigated and retested before progress. Correct nine outcome matrix, tie handling, both winner directions and earlier input/display checks. Full code or equivalent tool artefact, actual individual/paired contributions and truthful pending practical work. No hardware, GUI or peer performance inferred; no multi-round numerical score required. Grown-up review; personal evidence is required.

Worksheet 10

  1. Question 24: Explain iteration and iterative development in your own words. Use your saved versions and test log to describe one change, its reason and the evidence used to accept it or what remains Pending. Choose one next improvement, such as normalising uppercase or surrounding spaces, or rejecting an unknown choice. Specify the new expected behaviour and relevant tests before changing code. Explain why the complete game and earlier features need checking again. Review the approach with a partner if available or individually. Iteration means repetition; iterative development repeatedly builds/changes manageable parts, tests, corrects/retests and adds further parts. Real source/log evidence or truthful Pending, no invented failure needed if none observed. Improvement has exact policy and tests, e.g strip/lower accepts padded uppercase valid choices, or explicit rejection of unknown choice without falsely declaring a winner. Distinguish current valid-lowercase scope from proposed behaviour. Earlier input/display and all outcome combinations checked after changes; clear own contribution, actual review and next step. No false guarantee that finite tests prove every input. Grown-up review; personal evidence is required.
Back to my workbook ↑

Curriculum & workbook reference

Computing for your homeschool day

Explore Develop through repeated build/test cycles 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.