GRADE 8 · COMPUTING · UNIT 1 · LESSON 1.10
Computational thinking and programming
Ordered ELSEIF and fallback ELSE
Read a little. Try the workbook. Check your answers. Choose one section below to get started.
LET’S TRACE, REASON AND TEST
Ordered ELSEIF and fallback ELSE
An ordered IF/ELSEIF chain checks conditions until one is true. Only its branch runs; later conditions in that chain are skipped. Use a final ELSE for cases not matched earlier.
- Check conditions in order, stop choosing after the first match, and add a fallback for unmatched input.
- Explain my method and support it with a labelled trace, example or test record.

Work through an example
If score >= 20 selects Gold and ELSEIF score >= 10 selects Silver, a score of 25 selects Gold. Although 25 is also at least 10, the earlier true branch wins.
Try before your workbook
With the same order, what does score 15 select? What would a final ELSE cover?
Explore the clues
Tap one card to find out more.
Understand the idea
An ordered IF/ELSEIF chain checks conditions until one is true. Only its branch runs; later conditions in that chain are skipped. Use a final ELSE for cases not matched earlier.
Concept to practise: Ordered ELSEIF and fallback ELSE.
Work through an example
If score >= 20 selects Gold and ELSEIF score >= 10 selects Silver, a score of 25 selects Gold. Although 25 is also at least 10, the earlier true branch wins.
Try before your workbook
With the same order, what does score 15 select? What would a final ELSE cover?
Check my readiness thinking
It selects Silver: the first condition is false and the second is true. A final ELSE covers scores below 10 in this stated model.
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.
Choose the first match, then leave the chain
A final ELSE supplies a fallback when every explicit condition is False. It has no condition of its own. After the chain, continue with the next outside statement.
Investigate a chain without a fallback
ORIGINAL PALETTE PLAN A
INPUT colour
IF colour == "teal" THEN
OUTPUT "Sea palette"
ELSEIF colour == "coral" THEN
OUTPUT "Sunset palette"
ENDIFGive the unmatched route an output

Read this model’s labels and values
- Before
- start
- Start
- input
- INPUT colour
- Routes
- colour == "teal"
- output
- Sea
palette
- colour == "coral"
- output
- Sunset
palette
- Otherwise
- Choose another palette
Match a repaired diagram to its pseudocode
ORIGINAL PALETTE PLAN B
INPUT colour
IF colour == "teal" THEN
OUTPUT "Sea palette"
ELSEIF colour == "coral" THEN
OUTPUT "Sunset palette"
ELSE
OUTPUT "Choose another palette"
ENDIFRead the supplied original C02 learning-route plan
SUPPLIED ORIGINAL PAXA C02 PLAN
INPUT score
IF score < 0 OR score > 30 THEN
OUTPUT "Invalid score"
ELSEIF score >= 24 THEN
OUTPUT "Challenge route"
ELSEIF score >= 15 THEN
OUTPUT "Practice route"
ELSE
OUTPUT "Warm-up route"
ENDIF
OUTPUT "Route check finished"Trace threshold boundaries and an invalid input
| Game tally score | First matching test / fallback | Route message |
|---|---|---|
| 14 | {'clue': 'First match', 'prompt': 'Tally 14: first matching test or fallback', 'answers': ['ELSE']} | {'clue': 'Route message', 'prompt': 'Tally 14: route message before shared output', 'answers': ['Warm-up route']} |
| 15 | {'clue': 'First match', 'prompt': 'Tally 15: first matching test or fallback', 'answers': ['score >= 15']} | {'clue': 'Route message', 'prompt': 'Tally 15: route message before shared output', 'answers': ['Practice route']} |
| 23 | {'clue': 'First match', 'prompt': 'Tally 23: first matching test or fallback', 'answers': ['score >= 15']} | {'clue': 'Route message', 'prompt': 'Tally 23: route message before shared output', 'answers': ['Practice route']} |
| 24 | {'clue': 'First match', 'prompt': 'Tally 24: first matching test or fallback', 'answers': ['score >= 24']} | {'clue': 'Route message', 'prompt': 'Tally 24: route message before shared output', 'answers': ['Challenge route']} |
| 31 | {'clue': 'First match', 'prompt': 'Tally 31: first matching test or fallback', 'answers': ['score < 0 OR score > 30']} | {'clue': 'Route message', 'prompt': 'Tally 31: route message before shared output', 'answers': ['Invalid score']} |
Investigate a case-sensitive vowel chain
ORIGINAL VOWEL MATCHER
INPUT symbol
IF symbol == "a" THEN
OUTPUT "Vowel a"
ELSEIF symbol == "e" THEN
OUTPUT "Vowel e"
ELSEIF symbol == "i" THEN
OUTPUT "Vowel i"
ELSEIF symbol == "o" THEN
OUTPUT "Vowel o"
ELSEIF symbol == "u" THEN
OUTPUT "Vowel u"
ELSE
OUTPUT "No lowercase vowel match"
ENDIFPredict and check different input types
| Input string | Exact output |
|---|---|
| "a" | {'clue': 'Output', 'prompt': 'Vowel matcher input a', 'answers': ['Vowel a']} |
| "E" | {'clue': 'Output', 'prompt': 'Vowel matcher input uppercase E', 'answers': ['No lowercase vowel match']} |
| "?" | {'clue': 'Output', 'prompt': 'Vowel matcher input question mark', 'answers': ['No lowercase vowel match']} |
| "u" | {'clue': 'Output', 'prompt': 'Vowel matcher input u', 'answers': ['Vowel u']} |
Extend choices in a breakfast menu
For a toast extension, ask topping: 1 = jam; 2 = spread; any other topping gives Unknown topping. Porridge and fruit bowl must not ask for a toast topping.
Plan an accurate selection explanation
| Part | Evidence to include |
|---|---|
| Conditions and comparisons | A True/False test, all six comparison operators and a boundary example. |
| Simple IF | A pseudocode example with a False case that skips the inside action. |
| IF THEN ELSE | Two alternatives and test inputs reaching both. |
| ELSEIF and fallback | First-match order, a skipped later test and an unmatched input. |
| Everyday example and demo | A clear nonprogram example plus a checked code or diagram trace. |
| Presentation and reflection | A script, actual delivery or Pending, contribution evidence and a next step. |
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 12 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.5 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 12 worksheets
Worksheet 1
- Question 1: When is the second condition in an ELSEIF chain checked? only when the earlier condition is False
- Question 2: What happens after a matching alternative executes? later alternatives in that chain are skipped
Worksheet 2
- Question 3: For colour = "teal", what is displayed? Sea palette
- Question 4: For colour = "lime", what is displayed as written? nothing
- Question 5: After teal matches, is the coral comparison checked? No: it is skipped
Worksheet 3
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 4
- Question 6: Which keyword introduces the fallback block? ELSE
- Question 7: For colour = "Teal", which result follows under these exact-case rules? Choose another palette
- Question 8: Which position fits the new fallback output in the diagram? on the route where both comparisons are False
Worksheet 5
- Question 9: For score = 26, which route message is selected? Challenge route
- Question 10: Why is score >= 15 skipped after score >= 24 matches? the first matching alternative already selected the route
Worksheet 6
- Question 11: Tally 14: first matching test or fallback ELSE
- Question 12: Tally 14: route message before shared output Warm-up route
- Question 13: Tally 15: first matching test or fallback score >= 15
- Question 14: Tally 15: route message before shared output Practice route
- Question 15: Tally 23: first matching test or fallback score >= 15
- Question 16: Tally 23: route message before shared output Practice route
- Question 17: Tally 24: first matching test or fallback score >= 24
- Question 18: Tally 24: route message before shared output Challenge route
- Question 19: Tally 31: first matching test or fallback score < 0 OR score > 30
- Question 20: Tally 31: route message before shared output Invalid score
Worksheet 7
- Question 21: How many explicit comparison conditions are present? 5
- Question 22: When does the fallback run? when all five exact comparisons are False
Worksheet 8
- Question 23: Vowel matcher input a Vowel a
- Question 24: Vowel matcher input uppercase E No lowercase vowel match
- Question 25: Vowel matcher input question mark No lowercase vowel match
- Question 26: Vowel matcher input u Vowel u
- Question 27: What does the fallback prove about input "?"? it matched none of the five lowercase vowel strings
Worksheet 9
- Question 28: Where should the topping input belong? inside the toast alternative
- Question 29: How can a three-option question be represented with binary decision diamonds? use an ordered chain of comparisons and a fallback
Worksheet 10
- Question 30: Which statement about current Python is accurate? it has if/elif/else and also match/case; this lesson focuses on if/elif/else
- Question 31: What can checking only three rejected strings establish about another string? only that it did not match those three, not that it is secure
Worksheet 11
- Question 32: Write a complete ordered menu plan for the page 9 fictional breakfast choices, with a fallback. Add the toast-only topping question and both topping outcomes plus its fallback. Predict and check a case for every final outcome, including an unknown menu number and unknown topping. Then revise one question from your earlier recommendation quiz to allow at least three choices; show the new ELSEIF structure or linked binary comparisons and its unmatched route. Record actual test evidence, revision and any partner exchange still Pending. Menu IF choice==1 -> porridge; ELSEIF==2 -> ask topping, nested IF topping==1 jam; ELSEIF==2 spread; ELSE Unknown topping; ENDIF; ELSEIF choice==3 -> fruit bowl; ELSE Unknown choice; ENDIF. Distinct outputs and message order intentional, topping requested only for toast. Minimum routes (1), (2,1), (2,2), (2,9), (3), (9), or equivalent invalid integers. Extended quiz has at least three explicit choices with first-match structure and fallback; every outcome reachable, no dangling routes. Require honest trace/run evidence, actual source revision and Pending partner status if unavailable. No numerical grading. Grown-up review; personal evidence is required.
Worksheet 12
- Question 33: Prepare a short audio or video presentation with a script, using the six-part plan on page 10. Include a real-life decision example, pseudocode for simple IF and IF THEN ELSE, comparison operators, an ordered ELSEIF example and a boundary/fallback demonstration. Use your palette or menu evidence, and explain why reordering overlapping >= 24 and >= 15 tests can change an output. Present to an available group and answer questions if possible. Record the script or file reference, what was actually delivered, one evidenced contribution and how any disagreement was handled. Give a next step without numeric ratings; record unavailable recording, presentation or group work as Pending. Require coherent script and accurate definitions, all six comparisons separately from Boolean operations, original everyday example and pseudocode examples. Show True/False cases, optional ELSE for simple IF, exclusive selected alternatives, first-match skips and fallback. At game tally 26, >=24 first gives Challenge; >=15 first gives Practice and skips >=24. Evidence should identify exact script/file/trace; actual recording, delivery and audience questions only if performed. Solo plan/script may be complete with media/presentation/peer stages Pending. Reflect on real contribution/disagreement or explicitly no group, and specific next action. No invented password security, categorical no-case claim or numeric score. Grown-up review; personal evidence is required.
Curriculum & workbook reference
- Cambridge Lower Secondary Computing Learner’s Book 8 — pages 37–49
- PaxaKids Grade 8 Computing Lesson 1.10: Ordered ELSEIF and fallback ELSE — pages 1–12
Computing for your homeschool day
Explore Ordered ELSEIF and fallback ELSE 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.
