I can change a drawing by changing one number in that calculation.
Before class
Run the spiral, then try pensize(i + 1) yourself. Notice the first line is invisible because i is 0.
Running the lesson
Predict: show the loop with forward(i * 5) and ask what it draws. Take a vote before anyone runs it; the wrong options are a square (the counter does not change), a circle, and an error because i was never stored.
Run: students run it and compare. Ask: how long is the first line, and why?
Investigate: trace the counter 0, 1, 2, 3 and say that counting starts at 0, because later lessons rely on it. The second task checks that a name still holds a value you can calculate with.
Modify: students change the multiplier, then use the counter for the pen. Let them try pensize(i) first: it starts at 0, so the first line is thin. That is a good moment to talk about starting at 0.
The hard part (on purpose)
Believing the counter is the same number every pass, or that it starts at 1. Ask what i is on the first pass.
When students get stuck
The spiral is a square, with every line the same length. Ask: Is the length worked out from i, or typed as a number? Fix: The length must use i, for example forward(i * 5).
A student expects the first line to be 5 long. Ask: What is i on the very first pass? Fix: i is 0 on the first pass, so i * 5 is 0. Counting starts at 0.
An error says i is not defined. Ask: Is the line that uses i indented inside the for loop? Fix: i only exists inside the loop. Indent the line under the for line.
Stretch and support
Stretch: Draw a spiral that turns 91 degrees instead of 90. What happens, and why?
Support: Give the first three values of i * 5 and ask the student to continue the pattern before running.
Where it leads
Next lesson makes a value grow without the counter: a variable that adds to itself. Counters are used for scores, timers and animations. Class ideas: a spiral gallery with different multipliers.
What each step is for
Investigate: The counter takes a new value on every pass, so any line that uses it does something different each time round.
Modify: Because the line length is worked out from i, changing one number changes every line of the spiral.
Now you can
Say what i holds on each pass of a loop.
Use i in a calculation inside a loop.
Change a drawing by changing one number in that calculation.