Lesson Overview | Tirohanga Whānui
Ākonga act out an if/else rule, then build a one-question Scratch interaction and deliberately test correct, incorrect and unexpected answers.
Make a program ask a clear question, test a condition and choose what happens next.
Ākonga write rules that branch and then test them against cases chosen to make the rule fail, not cases chosen to make it pass.
Ākonga act out an if/else rule, then build a one-question Scratch interaction and deliberately test correct, incorrect and unexpected answers.
| Expression | Test value | True or false? |
|---|---|---|
| score > 4 | score = 7 | |
| answer = “blue” | answer = “Blue” | |
| touching edge? | sprite is in the centre |
Decide each row, then test the middle row in Scratch and see whether you were right.
= block ignores capital letters, so the comparison a student expects to fail actually succeeds. Do not teach “capitals always matter to a computer” — in this environment they do not. The honest and more useful point is that different languages compare text differently: Scratch ignores case here, while Python, JavaScript and Java do not, so "blue" == "Blue" is False in Python. A program’s rules come from the language, not from common sense.Row 2 is deliberately counter-intuitive. If a pair predicts FALSE and the block says TRUE, that disagreement is the learning — ask them what evidence would settle it, then run it.
The case that still fails: a trailing space. “blue ” = “blue” is FALSE in Scratch, which is why Activity 3 keeps the extra-space test.
IF card colour = greenTHEN move two tilesELSE turn rightwhen green flag clickedask “Which direction does the sun rise from: east or west?” and waitif <answer = “east”> then↳ say “Correct” for 2 secondselse↳ say “Try again: watch tomorrow's sunrise direction.” for 3 secondsTest blank input, different capitalisation and a correct answer with an extra space. Record which result is fair to the user. Improve the prompt, accepted answers or feedback without silently revealing the answer.
Manaakitanga: Helpful feedback supports another attempt; it does not mock a wrong answer.
Complete: “The condition is ___. When it is true, ___. When it is false, ___.” Name one edge case your test exposed.
Designing and developing an outcome through spatial and product design, materials, foods, biotechnology, systems, or digital tools
Selection makes the digital outcome responsive. See the unit map.
Resources already provided: truth table, human rule and target Scratch blocks above; Scratch, devices, three coloured cards and project logs.
Paearu Angitu | Success Criteria: I can state a Boolean condition, build both if/else paths, and use an edge-case test to improve the interaction.
Entry: Sort prepared inputs into true/false before coding. On-level: Build one tested if/else interaction. Extension: Accept more than one valid answer using an OR operator or add a score variable. Provide a paper truth table, keyboard-only controls and chunked one-path-at-a-time building for neurodiverse learners.
Use verifiable, low-stakes questions. Do not ask learners to encode assumptions about people or identity. If local reo, knowledge or place names appear, confirm spelling and permission with appropriate local authority. Lesson 6 turns unexpected outputs into systematic debugging evidence.
Scratch Ideas. The mātauranga Māori lens here is ethical design: conditions should not encode stereotypes, and feedback should uphold mana.