GRADE 8 · COMPUTING · UNIT 1 · LESSON 1.24
Computational thinking and programming
Design and test recommendations
Read a little. Try the workbook. Check your answers. Choose one section below to get started.
LET’S TRACE, REASON AND TEST
Design and test recommendations
Begin a recommendation algorithm with explicit requirements and accepted inputs. Choose the branches, predict their outcomes and test representative cases. A recommendation is only as complete as the stated rule.
- Combine categorical and numeric inputs, accommodate agreed text variants and supply an unmatched-input response.
- Explain my method and support it with a labelled trace, example or test record.

Work through an example
A fictional club rule could recommend art for choice "draw" and music for choice "sing", with a clear message for any other input. Tests should cover both recognised choices and an unrecognised one.
Try before your workbook
Why is testing only the recognised draw option insufficient?
Explore the clues
Tap one card to find out more.
Understand the idea
Begin a recommendation algorithm with explicit requirements and accepted inputs. Choose the branches, predict their outcomes and test representative cases. A recommendation is only as complete as the stated rule.
Concept to practise: Design and test recommendations.
Work through an example
A fictional club rule could recommend art for choice "draw" and music for choice "sing", with a clear message for any other input. Tests should cover both recognised choices and an unrecognised one.
Try before your workbook
Why is testing only the recognised draw option insufficient?
Check my readiness thinking
It leaves the other branch and invalid-input behaviour unchecked. Add independent expected results for sing and an unrecognised input, then record the actual evidence.
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.
Design recommendations from a clear policy
This lesson uses invented film titles, fictional age rules and imaginary songs. These are coding data, not real classifications or personal recommendations. All ages entered are fictional valid nonnegative integers.
Read the complete fictional film policy
| Exact category | Minimum age | Invented title |
|---|---|---|
| Adventure | 14 | Canyon code |
| Adventure | 10 | River rescue |
| Adventure | 0 | Garden voyage |
| Animation | 9 | Cloud builders |
| Animation | 0 | Little comet |
| Mystery | 12 | Clocktower clue |
| Mystery | 0 | Missing kite |
Trace the original exact-case version
Original Paxa fictional-film selector
age = int(input())
interest = input()
if age >= 14 and interest == "Adventure":
print("Canyon code")
elif age >= 10 and interest == "Adventure":
print("River rescue")
elif interest == "Adventure":
print("Garden voyage")
elif age >= 9 and interest == "Animation":
print("Cloud builders")
elif interest == "Animation":
print("Little comet")
elif age >= 12 and interest == "Mystery":
print("Clocktower clue")
elif interest == "Mystery":
print("Missing kite")Predict category and age outcomes
| Fictional age | Category text | Title or None |
|---|---|---|
| 14 | Adventure | {'clue': 'Exact text', 'prompt': 'Base film selection for 14/Adventure', 'answers': ['Canyon code']} |
| 10 | Adventure | {'clue': 'Exact text', 'prompt': 'Base film selection for 10/Adventure', 'answers': ['River rescue']} |
| 8 | Animation | {'clue': 'Exact text', 'prompt': 'Base film selection for 8/Animation', 'answers': ['Little comet']} |
| 12 | Mystery | {'clue': 'Exact text', 'prompt': 'Base film selection for 12/Mystery', 'answers': ['Clocktower clue']} |
| 14 | adventure | {'clue': 'Exact text', 'prompt': 'Base film selection for 14/adventure', 'answers': ['None']} |
Choose text normalisation deliberately
References: Python strip() and Python lower().
| Raw text, shown in quotes | Stored interest |
|---|---|
| "Adventure" | {'clue': 'Exact text', 'prompt': 'Normalised "Adventure"', 'answers': ['adventure']} |
| " ADVENTURE " | {'clue': 'Exact text', 'prompt': 'Normalised " ADVENTURE "', 'answers': ['adventure']} |
| "science fiction" | {'clue': 'Exact text', 'prompt': 'Normalised "science fiction"', 'answers': ['science fiction']} |
Original normalisation step
interest = input().strip().lower()Compare two valid approaches to accepted forms
A: two exact forms
interest = input()
if (age >= 14 and
(interest == "Adventure"
or interest == "adventure")):
print("Canyon code")B: normalised input
interest = input().strip().lower()
if age >= 14 and interest == "adventure":
print("Canyon code")Add a category and a fallback from a table
| Change | Policy |
|---|---|
| New Nature title | Age at least 11: Mountain journal. |
| New Nature fallback | Age below 11: Pond paths. |
| Unknown text | Unknown category after all category alternatives. |
| Text forms | Strip outside whitespace and convert to lowercase. |
Read the complete enhanced selector
Original Paxa enhanced fictional-film selector
age = int(input())
interest = input().strip().lower()
if age >= 14 and interest == "adventure":
print("Canyon code")
elif age >= 10 and interest == "adventure":
print("River rescue")
elif interest == "adventure":
print("Garden voyage")
elif age >= 9 and interest == "animation":
print("Cloud builders")
elif interest == "animation":
print("Little comet")
elif age >= 12 and interest == "mystery":
print("Clocktower clue")
elif interest == "mystery":
print("Missing kite")
elif age >= 11 and interest == "nature":
print("Mountain journal")
elif interest == "nature":
print("Pond paths")
else:
print("Unknown category")Test the changed policy, including the new threshold
| Fictional age | Raw category | Output |
|---|---|---|
| 10 | Nature | {'clue': 'Exact text', 'prompt': 'Enhanced film for 10/Nature', 'answers': ['Pond paths']} |
| 11 | nature | {'clue': 'Exact text', 'prompt': 'Enhanced film for 11/nature', 'answers': ['Mountain journal']} |
| 9 | " ANIMATION " | {'clue': 'Exact text', 'prompt': 'Enhanced film for 9/" ANIMATION "', 'answers': ['Cloud builders']} |
| 14 | adventure | {'clue': 'Exact text', 'prompt': 'Enhanced film for 14/adventure', 'answers': ['Canyon code']} |
| 15 | sport | {'clue': 'Exact text', 'prompt': 'Enhanced film for 15/sport', 'answers': ['Unknown category']} |
Design a song-choice table with a maximum duration
| Invented title | Style | Duration in minutes |
|---|---|---|
| Quiet orbit | classical | 4 |
| Dawn notes | classical | 2 |
| Harbour dance | folk | 5 |
| Trail echo | folk | 3 |
Read the complete original song selector
Original Paxa song-duration selector
maximum = int(input())
style = input().strip().lower()
if style == "classical" and maximum >= 4:
print("Quiet orbit")
elif style == "classical" and maximum >= 2:
print("Dawn notes")
elif style == "folk" and maximum >= 5:
print("Harbour dance")
elif style == "folk" and maximum >= 3:
print("Trail echo")
elif style == "classical" or style == "folk":
print("No song fits")
else:
print("Unknown style")Transfer the same reasoning to original module C04
Original Paxa c04_workshop_planner.py
minutes = int(input())
interest = input().strip().lower()
if minutes < 0 or minutes > 120:
print("Invalid time")
elif not (interest == "art" or interest == "science"):
print("Unknown interest")
elif interest == "art" and minutes >= 45:
print("Paper sculpture")
elif interest == "art" and minutes >= 20:
print("Pattern tiles")
elif interest == "science" and minutes >= 40:
print("Bridge challenge")
elif interest == "science" and minutes >= 15:
print("Shadow sketch")
else:
print("Choose a longer time")
print("Planner finished")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 14 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 14 worksheets
Worksheet 1
- Question 1: What should the code implement? the stated policy table and input rules
- Question 2: Why include an unmatched category test? to check the defined response when no category matches
Worksheet 2
- Question 3: For fictional age 14 and Adventure, which title should be selected? Canyon code
Worksheet 3
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 4
- Question 4: Base film selection for 14/Adventure Canyon code
- Question 5: Base film selection for 10/Adventure River rescue
- Question 6: Base film selection for 8/Animation Little comet
- Question 7: Base film selection for 12/Mystery Clocktower clue
- Question 8: Base film selection for 14/adventure None
Worksheet 5
- Question 9: Normalised "Adventure" adventure
- Question 10: Normalised " ADVENTURE " adventure
- Question 11: Normalised "science fiction" science fiction
Worksheet 6
- Question 12: Which approach accepts outer spaces around ADVENTURE as written? B
- Question 13: Why group the two exact forms in version A? both forms must still satisfy the age requirement
Worksheet 7
- Question 14: Where should a category-wide nature test appear? after the age-specific nature test
- Question 15: How many fallback else blocks can this one chain contain? at most one
Worksheet 8
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 9
- Question 16: Enhanced film for 10/Nature Pond paths
- Question 17: Enhanced film for 11/nature Mountain journal
- Question 18: Enhanced film for 9/" ANIMATION " Cloud builders
- Question 19: Enhanced film for 14/adventure Canyon code
- Question 20: Enhanced film for 15/sport Unknown category
Worksheet 10
- Question 21: For folk with a maximum of 4 minutes, which result follows the policy? Trail echo
- Question 22: For classical with a maximum of 1 minute, what should happen? No song fits
Worksheet 11
- Question 23: Which input selects Harbour dance at the exact duration boundary? maximum 5, style folk
Worksheet 12
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 13
- Question 24: Extend the page 3 fictional-film selector. Add a clear unmatched-category response, document which text forms you accept and implement that policy consistently. Add a new category different from the page 7 example, with at least two invented titles and stated minimum ages. Write its policy table before coding and explain the branch order. Test each original category, below and exactly at your new threshold, an agreed case variant and an unknown category. Record predictions and actual output or Pending, plus a correction/retest if needed. Cite the complete source, policy and test-record files. Preserve original three-category behaviour for valid nonnegative fictional ages, add one final unmatched fallback and documented exact-variants or normalisation policy. New category differs from Nature and has at least two invented titles/minimum ages; highest eligible policy stated and code puts specific threshold before broad fallback. Test original categories, new category below/at threshold, accepted case form and unknown, predictions/actual or Pending and correction/retest. Full table/source/records, comparisons complete and Boolean grouping correct. No invented real classifications, real learner age data or execution evidence. No numerical marks. Grown-up review; personal evidence is required.
Worksheet 14
- Question 25: Create your own table of at least two invented songs, styles and positive whole-minute durations. Include at least two different durations. State how to choose when several songs fit. Write a program that reads style and maximum whole minutes, outputs a suitable song, distinguishes a known style with no fitting song from an unknown style, and follows your agreed case policy. Test an exact duration, a shorter allowance, a longer allowance, a case variant and an unknown style. Record predicted and actual results or Pending and any correction/retest. Cite complete code, table and tests. At least two invented song records and distinct positive integer durations, explicit recognised styles and selection/tie policy, maximum valid nonnegative integer. Selected duration <= maximum and correct style; ordered choices follow stated policy. Known-but-too-short and unknown-style outputs distinguished; documented case policy implemented. Test exact duration, shorter/longer max, agreed case variant and unknown. Full table and source, comparisons/Boolean logic correct, predictions versus actual/Pending honest, correction/retest if needed. Accept equivalent consistent policy such as longest fitting or explicit priority. No real-world song metadata assumed, no invented learner GUI work or numeric marks. Grown-up review; personal evidence is required.
Curriculum & workbook reference
- Cambridge Lower Secondary Computing Learner’s Book 8 — pages 99–102
- PaxaKids Grade 8 Computing Lesson 1.24: Design and test recommendations — pages 1–14
Computing for your homeschool day
Explore Design and test recommendations 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.
