GRADE 7 · COMPUTING · UNIT 2 · LESSON 2.9

Decomposing problems: Creating a smart solution

Planning a smart solution

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

7 fillable worksheet pagesRead at your own pace

LET’S TRACE, REASON AND TEST

Planning a smart solution

Plan a smart solution by breaking the problem into inputs, conditions and outputs. Give both branches explicit behaviour and decide whether monitoring repeats. Use descriptive, consistent variable names. A prototype can model a decision without controlling a real door, blind or alarm.

Today’s two goals
  • Decompose a smart-device requirement into input, condition and outputs.
  • Plan and trace the two branches of a selection algorithm, including equality at a threshold.
Original PaxaKids illustration for Planning a smart solution. Precise program text and data are supplied in the workbook models.
An original PaxaKids workbook scene. Use the supplied programs and data for precise workbook facts.

Explore the clues

Tap one card to find out more.

Understand the idea

Plan a smart solution by breaking the problem into inputs, conditions and outputs. Give both branches explicit behaviour and decide whether monitoring repeats. Use descriptive, consistent variable names. A prototype can model a decision without controlling a real door, blind or alarm.

Concept to practise: Planning a smart solution.

Work through an example

For a model blind, level < 128 closes it and the false branch opens it. A reading of 128 belongs to the false branch. The loop should obtain a new reading so a later change can affect the next decision.

Try before your workbook

A model garage opens when its button is pressed and stays closed otherwise. Identify the input, condition and two outputs before writing code.

Check my readiness thinking

The input is the button state, the condition asks whether it is pressed, and the outputs are the model's open and closed states. Include both branches and a repeated check if ongoing monitoring is required.

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 smart-device problem into parts

Our goal: decompose a requirement into input, condition and outputs; trace both outcomes; plan and explain a garage-door algorithm.

Sami and Maya examine a tabletop smart-home model. A preset program follows rules already written for it. A useful plan says exactly what activates an output and what happens otherwise.

Specify the blind-control requirement

Original input, process and output model
StageAction
INPUTCurrent light-level reading, 0–255.
CONDITIONIs light_level < 128?
OUTPUTTrue: CLOSE blinds. False: OPEN blinds.

Trace both routes through a complete plan

    Decision: level < 128?

    True branch
    1. CLOSE blinds
    False branch
    1. OPEN blinds

    Check the boundary and name the variable

    Check the boundary and name the variable — original model
    StyleExample
    snake_caselight_level
    camelCaselightLevel

    State both outcomes for the garage model

    State both outcomes for the garage model — original model
    PartStated model behaviour
    InputCurrent key-button state: pressed or not pressed.
    ConditionIs the key button pressed?
    True outcomeSend an OPEN command.
    False outcomeSend no new door command.
    Paxa the Fox

    Try one step with Paxa!

    Use the API for the chosen editor. Label paper traces, simulator runs and physical tests accurately; ask a grown-up before connecting equipment. Save personal responses before leaving.

    Our Unit 2 learning path
    1. Lesson 2.1: All about software
    2. Lesson 2.2: Introducing the micro:bit
    3. Lesson 2.3: Using Python with the micro:bit
    4. Lesson 2.4: The micro:bit Python environment
    5. Lesson 2.5: Correcting errors using a flowchart
    6. Lesson 2.6: Using sensors in programming
    7. Lesson 2.7: Flowcharts for algorithm planning
    8. Lesson 2.8: Algorithmic solutions and data types
    9. Lesson 2.9: Planning a smart solution
    10. Lesson 2.10: Effective testing
    11. Lesson 2.11: Evaluating a program
    12. Lesson 2.12: Testing accelerometer gestures
    13. Lesson 2.13: Protecting a museum crown
    14. Lesson 2.14: Final project
    15. Lesson 2.15: Evaluation
    16. Lesson 2.16: What can you do?
    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 the 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.

    Planning a smart solution7 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 7 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 7 worksheets

    Worksheet 1

    1. Question 1: What does decomposition help us do? split the problem into manageable parts
    2. Question 2: Which is a clear condition? light_level < 128

    Worksheet 2

    1. Question 3: What should the program read again before the next decision? the current light level
    2. Question 4: Which values take the False branch? 128 and all higher readings on the scale

    Worksheet 3

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

    Worksheet 4

    1. Question 5: Reading 127: which blind command is chosen? CLOSE
    2. Question 6: Reading 128: which blind command is chosen? OPEN
    3. Question 7: Reading 129: which blind command is chosen? OPEN
    4. Question 8: Which name follows snake_case? key_pressed

    Worksheet 5

    1. Question 9: What happens when the button is not pressed? no new door command is sent
    2. Question 10: The model is already open, then the key is released. With no other action, what follows? it stays open; release sends no new command

    Worksheet 6

    1. Question 11: Draw the full repeated flowchart for the page 5 garage model. Include Start, reading the key-button state, the decision, labelled True/False paths, each stated output and a return to a fresh input. Do not add an automatic CLOSE command. Start, read key_pressed Boolean, decision key_pressed?, True issue OPEN command, False no new door command, rejoin and read again (optional pause). Correct symbols/arrows and explicit branch labels. No closing-on-release invented: model rule on page 5 deliberately states no new command when False. OPEN abstract command is not direct motor wiring. Accept an equivalent no-action False bypass clearly labelled. If student represents door position, initial closed and no other action means a door already opened stays open when button released. No numeric scoring. Grown-up review; personal evidence is required.

    Worksheet 7

    1. Question 12: Explain your garage algorithm aloud, linking its input to both outcomes. Trace a not-pressed input, a pressed input and a later release. Record your partner’s finding and any correction, then retrace it. Explain how the blind model handles exactly 128 and why “False means greater than 128” would be incomplete. Garage False: no new command. True: OPEN. Release: False/no new command; if already opened, no CLOSE is implied. Clear verbal connection input then condition then chosen command/no-action, repeat reads fresh input, labelled both routes. Peer finding, actual correction or confirmed clear plan and retrace recorded; identify self-check honestly if no partner. Blind threshold 128: 128 is not = 128 on numeric scale, including equality. Correct C09 omission. Variable stores current reading; names descriptive and consistent. Accept equivalent precise explanation and model chart; no invented physical device observation or numeric scoring. Grown-up review; personal evidence is required.
    Back to my workbook ↑

    Curriculum & workbook reference

    Computing for your homeschool day

    Explore Planning a smart solution with this free Grade 7 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.

    For programme background, visit the Cambridge Lower Secondary Computing overview. PaxaKids provides independent original companion practice.

    The book pages identify the related teaching topic. 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.