Unplugged Computational Thinking Seminar · Lesson 4: Loops and Patterns

When code repeats, can one clear loop do the work of many blocks?

Unplugged Computational Thinking Seminar · Lesson 4

Seminar focus: spot the repeat

Ākonga find repetition in patterns and routines and express it as a loop in words, so the idea is owned before it is typed.

  • Unplugged Seminar move: Repetition identified and written as a loop in plain language
  • Evidence it produces: A long instruction list correctly rewritten as a short repeated one
Other teaching approach: Creative Coding Studio →

Lesson at a Glance | Te Hōtaka

Lesson Overview | Tirohanga Whānui

Ākonga compare repeated blocks with a loop, trace a square movement, and then change the repeat count and turn angle to build an original geometric movement pattern.

Ngā Whāinga Ako | Learning Intentions

  • Recognise repetition in an algorithm.
  • Use a count-controlled loop, traced on paper (optionally also in Scratch).
  • Compare two solutions for clarity and ease of change.

Do Now: Compress the instructions

7 min

A robot must clap, step, turn; clap, step, turn; clap, step, turn; clap, step, turn. Rewrite this in one line without losing the order. What tells the robot when to stop?

Activity 1: Same output, different code

12 min
Version Amove 50 stepsturn 90 degreesmove 50 stepsturn 90 degrees…repeat four times
Version Brepeat 4↳ move 50 steps↳ turn 90 degreesend
  1. Trace both on paper from the same start.
  2. Circle what must change if every move becomes 70 steps.
  3. Decide which version is clearer and support the claim with block-count evidence.

Activity 2: Build and verify a loop

22 min
  1. On paper, mark the sprite's start position and facing direction.
  2. Trace the Version B loop step by step — move 50 steps, turn 90 degrees, repeated four times — redrawing the sprite's position after each block.
  3. Predict the final position before tracing it.
  4. Trace it. If the sprite does not return to its start, check repeat count, turn angle and block order one at a time.
  5. Change only movement distance and confirm the shape changes size but not number of sides.
  6. If your class has devices, you can also build and run the same loop in Scratch (Pen extension optional) to check your paper trace — optional, not required for this route.

Activity 3: Pattern challenge

12 min

Choose a repeat count of 3, 4, 5, 6 or 8. Start with turn angle 360 ÷ repeat count. Predict, run and refine an original movement pattern. Label it as your own design rather than borrowing a cultural motif.

  1. Record repeat count, turn angle and predicted result.
  2. Run it and sketch the actual result.
  3. Change one value and explain the effect.

Exit: When is a loop better?

7 min

Make a claim using both criteria: fewer places to edit and same intended output. Name one situation where a fixed repeat loop would be the wrong choice.

🎯 Curriculum Alignment
Designing and developing an outcome through spatial and product design, materials, foods, biotechnology, systems, or digital tools

The loop becomes a required construct in the final outcome. See the evidence map.

📦 Materials & Resources

Resources already provided: both code versions above, grid paper and pencils for tracing. Devices and Scratch (with the optional Pen extension) are for classes that want to compare the paper trace to a screen version — not required for this route.

📊 Assessment and Success Criteria

Paearu Angitu | Success Criteria: I can identify repeated blocks, replace them with a loop, predict the output and explain why the loop is easier to modify.

♿ Inclusion, entry and extension

Entry: Physically repeat a three-action sequence, then place it inside a paper loop frame. On-level: Build, predict and test the square plus one variation. Extension: Nest loops or make a user control repeat count with a variable. Provide visual traces, reduced-motion settings and an unplugged route for neurodiverse or device-limited learners.

📋 Teacher Planning Snapshot

Insist on prediction before run. The maths is a tool, not a detour. Avoid presenting tukutuku, tāniko or kōwhaiwhai as generic coding decoration; local cultural designs carry knowledge and authority. Lesson 5 adds decisions to repeated and sequenced code.

📚 Sources and teaching basis

Scratch Ideas. The manaakitanga lens is authorship and permission: learners make and name their own patterns rather than lifting taonga for visual effect.