GRADE 8 · COMPUTING · UNIT 1 · LESSON 1.11

Computational thinking and programming

Match flowchart and pseudocode branches

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

Topic 1.11 · Match flowchart and pseudocode branches8 fillable worksheet pagesRead at your own pace

LET’S TRACE, REASON AND TEST

Match flowchart and pseudocode branches

A decision diagram and pseudocode should express the same conditions, branches and outputs. Check their behaviour with specific inputs rather than matching box positions alone.

Today’s two goals
  • Compare two representations and repair a missing path/output so that they behave equivalently.
  • Explain my method and support it with a labelled trace, example or test record.
Original PaxaKids illustration for Match flowchart and pseudocode branches. 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 diagram asking size < 4 should route 3 to the true branch and 4 to the false branch. Equivalent pseudocode must preserve that exact comparison and the two destinations.

Try before your workbook

A diagram uses x <= 7, but pseudocode uses x < 7. Which test value exposes the difference?

Explore the clues

Tap one card to find out more.

Understand the idea

A decision diagram and pseudocode should express the same conditions, branches and outputs. Check their behaviour with specific inputs rather than matching box positions alone.

Concept to practise: Match flowchart and pseudocode branches.

Work through an example

A diagram asking size < 4 should route 3 to the true branch and 4 to the false branch. Equivalent pseudocode must preserve that exact comparison and the two destinations.

Try before your workbook

A diagram uses x <= 7, but pseudocode uses x < 7. Which test value exposes the difference?

Check my readiness thinking

Use x = 7. The diagram follows its true branch, while the pseudocode follows its false branch. The boundary distinguishes the algorithms.

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.

Compare behaviour, not just matching words

Two representations can look similar but behave differently. Compare the input, question, comparisons, route order, outputs and ending. Then choose tests that reach every intended outcome.

A counterexample is one input for which the outputs differ. It is enough to show that two claimed equivalents are not equivalent.

Read the complete original maths-feedback plan

The input is an integer answer. First display the question, then choose exactly one feedback message. OUTPUT displays each quoted message on a separate line.
ORIGINAL COMPLETE PLAN
OUTPUT "What is 6 * 3?"
INPUT answer
IF answer == 18 THEN
    OUTPUT "Exact"
ELSEIF answer > 18 THEN
    OUTPUT "Above"
ELSE
    OUTPUT "Below"
ENDIF

Inspect the incomplete original Diagram A

Diagram A is deliberately missing one feedback output. Its remaining arrows still reach Stop. Compare its behaviour with the complete plan on page 2.
Inspect the incomplete original Diagram A — original labelled workbook model. The following text version gives its labels and values.
Inspect the incomplete original Diagram A · original PaxaKids model.
Read this model’s labels and values
Before
    1. start
    2. Start
    1. output
    2. OUTPUT "What is 6 * 3?"
    1. input
    2. INPUT answer
Routes
    1. answer == 18
    2. output
    3. OUTPUT
      "Exact"
    1. answer > 18
    2. output
    3. OUTPUT
      "Above"
Omit fallback
True

Find the counterexample by tracing both versions

Compare only the feedback after the shared initial question. Write none if Diagram A gives no later feedback for that input.
Find the counterexample by tracing both versions — original model
Input answerPlan feedback after questionDiagram A feedback after question
17{'clue': 'Feedback', 'prompt': 'Answer 17: plan feedback after question', 'answers': ['Below']}{'clue': 'Feedback or none', 'prompt': 'Answer 17: incomplete diagram feedback after question', 'answers': ['none']}
18{'clue': 'Feedback', 'prompt': 'Answer 18: plan feedback after question', 'answers': ['Exact']}{'clue': 'Feedback or none', 'prompt': 'Answer 18: incomplete diagram feedback after question', 'answers': ['Exact']}
19{'clue': 'Feedback', 'prompt': 'Answer 19: plan feedback after question', 'answers': ['Above']}{'clue': 'Feedback or none', 'prompt': 'Answer 19: incomplete diagram feedback after question', 'answers': ['Above']}

Match every part to its diagram location

Match every part to its diagram location — original model
Plan partMatching flowchart part
Initial question OUTPUTOutput parallelogram before INPUT answer.
INPUT answerInput parallelogram before the first decision.
IF answer == 18First decision diamond.
OUTPUT ExactTrue route from the equality decision.
ELSEIF answer > 18Second decision, reached only after first is False.
OUTPUT AboveTrue route from the greater-than decision.
ELSE / OUTPUT BelowFalse route from the second decision: missing in A.
ENDIF / continuationSelected branches rejoin before Stop.

Transfer the comparison to a parcel target

At this pretend counter, mass_g is a positive whole-number mass in grams. The target is 1000 g. These are fictional measured inputs, not values read from the illustration.
ORIGINAL PARCEL PLAN
INPUT mass_g
IF mass_g == 1000 THEN
    OUTPUT "On target"
ELSEIF mass_g > 1000 THEN
    OUTPUT "Over target"
ELSE
    OUTPUT "Under target"
ENDIF

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.

Match flowchart and pseudocode branches8 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 8 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.2 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 8 worksheets

Worksheet 1

  1. Question 1: Which evidence disproves an equivalence claim? one input producing different output sequences
  2. Question 2: What should be preserved when translating a decision? conditions, order, actions and continuation

Worksheet 2

  1. Question 3: Which feedback follows answer = 18? Exact
  2. Question 4: Which feedback follows answer = 21? Above
  3. Question 5: Which feedback follows answer = 16? Below

Worksheet 3

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

Worksheet 4

  1. Question 6: Answer 17: plan feedback after question Below
  2. Question 7: Answer 17: incomplete diagram feedback after question none
  3. Question 8: Answer 18: plan feedback after question Exact
  4. Question 9: Answer 18: incomplete diagram feedback after question Exact
  5. Question 10: Answer 19: plan feedback after question Above
  6. Question 11: Answer 19: incomplete diagram feedback after question Above
  7. Question 12: Which tested input shows a difference between the two versions? 17
  8. Question 13: What does Diagram A display for answer 17 as written? the question only

Worksheet 5

  1. Question 14: Where must Below be inserted to match the plan? on False from the second decision, before rejoining Stop

Worksheet 6

  1. Question 15: For mass_g = 999, which output follows? Under target

Worksheet 7

  1. Question 16: Redraw Diagram A so that it behaves like the page 2 plan. Include the question output, answer input, both comparisons and all three feedback outputs. Label every decision exit and join each selected route to Stop. Mark the added output and explain its position. Check answers 17, 18 and 19; record the question and feedback in order. Identify a counterexample to the original equivalence claim and say whether you used a manual trace or an actual run. Add OUTPUT Below only on False from answer > 18, reached after answer == 18 is False. All other nodes/messages unchanged; outputs/input parallelograms, decision diamonds, readable labelled arrows and Stop. 17: question then Below; 18 question then Exact; 19 question then Above. Original Diagram A gives question only for 17, while plan gives additional Below, so 17 is counterexample. Both matched cases agree before/after repair; test all three branches. Do not claim that passing selected tests alone proves all possible equivalence. Honest method/evidence; no numeric marks. Grown-up review; personal evidence is required.

Worksheet 8

  1. Question 17: Adapt the parcel plan on page 6 for a new target of 750 g. Show matching pseudocode and a complete flowchart with equal, greater and fallback routes. Test masses 749, 750 and 751 g and record the exact output. Explain why changing only one occurrence of 1000 would make an inconsistent target rule. Compare both representations statement by statement and through all three tests; cite the exact revision and method, with any device or peer step still Pending. Both comparisons use 750: mass_g == 750 and mass_g > 750; fallback below 750, positive whole grams domain. Outputs Under target, On target, Over target for 749/750/751. Input/output parallelograms, equality then greater diamonds, labelled True/False, final fallback and joined Stop. Example inconsistent revision: equality 750 but greater 1000 makes 751 fall to Under target incorrectly. Clear one-to-one correspondence and same three outcomes required; actual trace/run evidence and Pending steps honest. No claim selected tests are universal proof. Grown-up review; personal evidence is required.
Back to my workbook ↑

Curriculum & workbook reference

Computing for your homeschool day

Explore Match flowchart and pseudocode branches 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.