We are learning to
- We are learning to implement repetition with a variable.
- We are learning to trace and correct a program.
Success criteria: I can…
- My program accepts input 4, makes four repeated marks and ends with count = 4.
- I can explain which block caused an incorrect count.
Lesson sequence
50 min total- 1
Trace a paper program
Starter 0–8 minTeacherDisplay blocks: ask for repeatCount input (enter 4); set count to 0; repeat repeatCount times [draw a square; change count by 1]; say count. Ask for predicted marks and final count. Trace each turn on a four-row table.
StudentsRecord counts 1, 2, 3, 4 and four drawn squares.
Block cards Four-row trace table - 2
Build the blocks
Main 8–24 minTeacherProvide an approved visual programming tool or printed block cards. Demonstrate how to enter 4 through an input block, store it as repeatCount, and place the increment inside the loop. Keep the output on screen or paper, not in a public account.
StudentsEnter 4 as the repeatCount input, build the program, run or act it out, and compare output to prediction.
School-approved visual programming tool or paper blocks - 3
Debug one change
Main 24–40 minTeacherGive a flawed version with “change count by 1” outside the loop. Ask students to trace the result: four squares but count 1. Invite them to move the block inside and rerun. Then ask why setting count to 1 initially would end at 5.
StudentsFind, explain and fix the misplaced block; test the changed starting value.
Flawed block set Trace table - 4
Show evidence
Plenary 40–50 minTeacherAsk each pair for the input value, final count, number of marks and a one-sentence explanation of the fix. Collect the trace or screenshot.
StudentsDescribe what the loop repeats and what the variable stores.
Exit slip
Key vocabulary
Differentiation
Support
- Provide a worked example and a choice of two responses.
- Offer verbal, drawn or written responses.
Extension
- Ask students to justify a second possible approach using the same concept.
Accessibility
- Read prompts aloud and provide large-print copies.
- Allow movement or presentation alternatives without penalty.
Assessment
- Check a trace with four increments and final 4.
- Ask why the flawed program reports 1 despite four marks.
Resources
- Block cards
- Four-row trace table
- School-approved visual programming tool or paper blocks
- Flawed block set
- Trace table
- Exit slip
Safety notes
- Use only school-approved accounts and keep student work private.
- Take screen breaks and keep device cables clear.