GRADE 8 · COMPUTING · UNIT 1 · LESSON 1.40

Computational thinking and programming

Decompose everyday problems

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

Topic 1.40 · Decompose everyday problems10 fillable worksheet pagesRead at your own pace

LET’S TRACE, REASON AND TEST

Decompose everyday problems

Decomposition breaks a task into manageable parts with clear purposes. Check that the parts together meet the original requirement. A list of unrelated actions is not a complete decomposition.

Today’s two goals
  • Identify reusable sub-problems and expand one into an algorithm.
  • Explain my method and support it with a labelled trace, example or test record.
Original PaxaKids illustration for Decompose everyday problems. 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 simple quiz can be divided into obtaining a response, checking it against a rule, updating a score and reporting feedback. Each part has a defined input or output.

Try before your workbook

What extra part might a quiz need if blank answers must be rejected before marking?

Explore the clues

Tap one card to find out more.

Understand the idea

Decomposition breaks a task into manageable parts with clear purposes. Check that the parts together meet the original requirement. A list of unrelated actions is not a complete decomposition.

Concept to practise: Decompose everyday problems.

Work through an example

A simple quiz can be divided into obtaining a response, checking it against a rule, updating a score and reporting feedback. Each part has a defined input or output.

Try before your workbook

What extra part might a quiz need if blank answers must be rejected before marking?

Check my readiness thinking

It needs input checking before marking. State how that part handles a blank response and passes a valid response onward.

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.

Break a large problem into manageable parts

Decomposition means dividing a problem into smaller responsibilities, or sub-problems. Each can be developed in more detail, then combined with the others to solve the whole problem. There can be several useful decompositions.

A sub-problem such as Pack the school bag contains several actions. Opening the bag is one detailed action within it. The useful level of detail depends on who will follow the algorithm.

Read a morning-routine decomposition

This original diagram groups five responsibilities within preparing for school. It is a decomposition diagram, not a flowchart: its lines show what belongs to the problem, rather than the exact time order. Some routines can be reused on other days.
Read a morning-routine decomposition — original labelled workbook model. The following text version gives its labels and values.
Read a morning-routine decomposition · original PaxaKids model.
Read this model’s labels and values
Root
Prepare for school
Children
  1. Get up
  2. Get washed
  3. Get dressed
  4. Have breakfast
  5. Pack the school bag

Distinguish responsibilities from detailed actions

Use B for a broad sub-problem and D for a detailed action in the stated morning routine. This is a chosen useful level of detail, not a claim that no action could ever be described more precisely.
Distinguish responsibilities from detailed actions — original model
PhraseB or D
Prepare breakfast{'clue': 'B or D', 'prompt': 'Classify Prepare breakfast', 'answers': ['B']}
Put the bowl on the table{'clue': 'B or D', 'prompt': 'Classify Put the bowl on the table', 'answers': ['D']}
Get dressed{'clue': 'B or D', 'prompt': 'Classify Get dressed', 'answers': ['B']}
Close the bag zip{'clue': 'B or D', 'prompt': 'Classify Close the bag zip', 'answers': ['D']}
Pack the school bag{'clue': 'B or D', 'prompt': 'Classify Pack the school bag', 'answers': ['B']}
Open the school bag{'clue': 'B or D', 'prompt': 'Classify Open the school bag', 'answers': ['D']}

Expand one sub-problem into an algorithm

For this example the required items are one book, one notebook and one pencil case. The ordered steps below expand Pack the school bag. A different timetable may change the required items without changing the overall purpose.
  1. Read today’s timetable and list required items.
  2. Collect the listed book, notebook and pencil case.
  3. Open the school bag.
  4. Place the collected items in the bag.
  5. Close the bag and check it is ready.

Model an alert system at the planning level

This fictional classroom model manages a door-open alert. Its three broad responsibilities are shown here. Arm the model expands into reading a demonstration switch, storing the armed state and displaying Ready. No real security installation is being built.
Model an alert system at the planning level — original model
Broad responsibilityExample purpose
Arm the modelPrepare it to respond to the demonstration input.
Check for a door-open eventRead the model input and decide whether to signal.
Reset the modelClear the alert and return to the stated ready condition.

Reuse a part while checking its assumptions

A breakfast routine can be reused on a school day or weekend. Bag packing can be adapted for another class by changing its item list. Reuse needs suitable inputs and assumptions.

Some parts depend on others: departure needs the bag ready. Decomposition does not mean every part is independent or can run in any order.

Know the complete game before decomposing it

Two players alternate X and O on an initially empty 3 by 3 board, starting with X. A valid move uses an empty square. Three equal marks in any row, column or diagonal win. A full board without a winner is a draw. Stop after a win or draw. Board A shows an X win; Board B is still in progress.
Know the complete game before decomposing it — original labelled workbook model. The following text version gives its labels and values.
Know the complete game before decomposing it · original PaxaKids model.
Read this model’s labels and values
Boards
  1. Title
    Board A: X has won
    Cells
    1. X
    2. X
    3. X
    4. O
    5. O
  2. Title
    Board B: still playing
    Cells
    1. X
    2. O
    3. O
    4. X

Map game work to reusable responsibilities

Use the page 7 boards and rules. Match each detailed action to Set up, Take a valid turn, Check outcome or Switch player. Check outcome is reused after either player’s valid move.
Map game work to reusable responsibilities — original model
Game workResponsible sub-problem
Create the empty board{'clue': 'Role name', 'prompt': 'Role for Create the empty board', 'answers': ['Set up']}
Check a chosen square is empty{'clue': 'Role name', 'prompt': 'Role for Check a chosen square is empty', 'answers': ['Take a valid turn']}
Record X or O in the chosen square{'clue': 'Role name', 'prompt': 'Role for Record X or O in the chosen square', 'answers': ['Take a valid turn']}
Check rows, columns and diagonals{'clue': 'Role name', 'prompt': 'Role for Check rows, columns and diagonals', 'answers': ['Check outcome']}
Choose the other player after a non-final turn{'clue': 'Role name', 'prompt': 'Role for Choose the other player after a non-final turn', 'answers': ['Switch player']}

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.

Decompose everyday problems10 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.1 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: Which phrase describes decomposition? dividing a problem into smaller manageable parts
  2. Question 2: Which is a broad sub-problem rather than one bag-packing action? Pack the school bag

Worksheet 2

  1. Question 3: How many broad sub-problems are shown? 5
  2. Question 4: Which shown sub-problem contains opening and closing the school bag? Pack the school bag / Pack school bag

Worksheet 3

  1. Question 5: Classify Prepare breakfast B
  2. Question 6: Classify Put the bowl on the table D
  3. Question 7: Classify Get dressed B
  4. Question 8: Classify Close the bag zip D
  5. Question 9: Classify Pack the school bag B
  6. Question 10: Classify Open the school bag D

Worksheet 4

  1. Question 11: Why is this an algorithm rather than just a decomposition list? it gives ordered actions for one sub-problem

Worksheet 5

  1. Question 12: Which item belongs in the broad decomposition? Reset the model
  2. Question 13: Which item is a detailed action in the given expansion? store the armed state

Worksheet 6

  1. Question 14: What supports reusing the bag-packing routine for another class? give it the correct required-item list
  2. Question 15: Which statement about sub-problems is accurate? some parts may depend on results from others
  3. Question 16: Which broad morning sub-problem could also be used on a weekend? Write the breakfast example. Have breakfast / Having breakfast / Prepare breakfast

Worksheet 7

  1. Question 17: Which input is a valid move? an empty square on the board
  2. Question 18: When is a full board a draw? when neither player has a winning line

Worksheet 8

  1. Question 19: Role for Create the empty board Set up
  2. Question 20: Role for Check a chosen square is empty Take a valid turn
  3. Question 21: Role for Record X or O in the chosen square Take a valid turn
  4. Question 22: Role for Check rows, columns and diagonals Check outcome
  5. Question 23: Role for Choose the other player after a non-final turn Switch player

Worksheet 9

  1. Question 24: Choose one of the five page 2 morning responsibilities. State its purpose, required items or information and what counts as completion. Write a clear ordered algorithm, including any necessary choices, and trace it using one stated fictional situation. Explain how the same sub-problem could be reused on another day and what must change. Keep the broad title distinct from its detailed steps; record a correction or a remaining question. No real morning activity needs to be performed. One stated broad morning responsibility, coherent purpose/input/completion and enough ordered detailed steps for a reader at the intended level. Choice and trace consistent with the fictional situation. Bag example may use listed items, collect/open/place/close/check; other routines accepted. Explain reuse with changed assumptions or inputs, not a claim that every part is universally independent. Retain title, full algorithm, trace and justified correction/question. A paper trace is valid evidence; do not infer actual personal routines, physical performance or numeric grades. Grown-up review; personal evidence is required.

Worksheet 10

  1. Question 25: Decompose the complete page 7 noughts-and-crosses game into broad responsibilities. Include setup, valid turns, outcome checks, player switching and stopping. Expand one responsibility into an algorithm and explain which part can be reused for both players. Compare your plan with another pair if available, noting useful feedback and a justified revision. Otherwise compare individually with page 8 and mark peer exchange Pending. Keep both plans, the expanded algorithm, your contribution and one next step. Coherent complete broad decomposition covering empty board/initial player, valid empty-square input and marking, all row/column/diagonal win checks, full-board draw only without winner, switching only after a non-final valid turn, and stopping after win/draw. Grouping may differ from supplied roles if complete and justified. Expanded responsibility has ordered steps and relevant decisions; check outcome or valid-turn logic reusable with player/board inputs. Actual peer comparison/feedback and revision or honest individual comparison with peer exchange Pending. Own contribution and next step; no invented game execution or partner confirmation. Grown-up review; personal evidence is required.
Back to my workbook ↑

Curriculum & workbook reference

Computing for your homeschool day

Explore Decompose everyday problems 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.