Unplugged Computational Thinking Seminar · Lesson 5: Conditionals and Choice

Make a program ask a clear question, test a condition and choose what happens next.

Unplugged Computational Thinking Seminar · Lesson 5

Seminar focus: the decision point

Ākonga write rules that branch and then test them against cases chosen to make the rule fail, not cases chosen to make it pass.

  • Unplugged Seminar move: Rule stated, then attacked with a counter-case
  • Evidence it produces: A branching rule plus the case that exposed its gap
Other teaching approach: Creative Coding Studio →

Lesson at a Glance | Te Hōtaka

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.

Ngā Whāinga Ako | Learning Intentions

  • Describe a condition that can be true or false.
  • Use if/else to create two possible paths.
  • Test expected and unexpected user input.

Do Now: Decide the truth value

7 min
ExpressionTest valueTrue or false?
score > 4score = 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.

🔑 Answer key and the surprise in row 2 (kaiako)
  1. score > 4 with score = 7 → TRUE.
  2. answer = “blue” with answer = “Blue” → TRUE in Scratch. This is the row worth the lesson. Scratch’s = 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.
  3. touching edge? with the sprite in the centre → FALSE.

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.

Activity 1: Run a human conditional

10 min
IF card colour = greenTHEN move two tilesELSE turn right
  1. Run with a green card, a blue card and no card.
  2. Record which path ran each time.
  3. Rewrite the condition so “no card” has a safe, clear result.

Activity 2: Build a one-question interaction

23 min
when 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 seconds
  1. Build and test the exact interaction.
  2. Replace it with a question you can verify and explain.
  3. Write the expected result for one correct and one incorrect answer before testing.
  4. Add a clear restart path so the next user can try.

Activity 3: Edge-case test

13 min

Test 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.

Exit: Trace both paths

7 min

Complete: “The condition is ___. When it is true, ___. When it is false, ___.” Name one edge case your test exposed.

🎯 Curriculum Alignment
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.

📦 Materials & Resources

Resources already provided: truth table, human rule and target Scratch blocks above; Scratch, devices, three coloured cards and project logs.

📊 Assessment and Success Criteria

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.

♿ Inclusion, entry and extension

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.

📋 Teacher Planning Snapshot

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.

📚 Sources and teaching basis

Scratch Ideas. The mātauranga Māori lens here is ethical design: conditions should not encode stereotypes, and feedback should uphold mana.