Materials & Prep
- Chromebooks, one per student, opened to the class block-coding workspace.
- Post or project the starter blocks: move 30 steps; turn right 45 degrees; change color effect by 10.
- Prepare a starter project with those three blocks copied eight times, plus a second blank workspace for the loop version.
Opening
Ask“If I need you to do this pattern eight times: clap, tap desk, snap, what is the clearest way to tell a partner?” Students silently practice one round, then tell a partner how they would give the instruction without saying all 24 actions.
ConnectTake several responses such as “do clap-tap-snap eight times.” Point out that students kept the three-action pattern together and gave one repeat instruction. “Computers need that same kind of instruction when a pattern repeats.” Do not introduce loop blocks yet.
Display the class’s copied code from the previous task: move 30, turn right 45, change color by 10, repeated eight times. Ask students to predict what will happen if the turn must change from 45 to 60. Have them hold up fingers for how many places must be edited. Confirm that all eight copied turns must change. This makes the copy-and-paste cost visible.
Direct instruction
IntroduceA loop is a block that repeats the blocks placed inside it. The blocks inside are the loop body; the number tells how many times the whole body repeats.
Worked exampleRun the copied version with this exact pattern eight times:
move 30 steps turn right 45 degrees change color effect by 10
Think aloud“I first find the smallest pattern that repeats. It is not just ‘move 30.’ The sprite must move, turn, and change color before the same pattern begins again. I put all three blocks inside repeat 8. Now the computer does three blocks, then starts those same three again, until it has done eight rounds.” Build and run:
repeat 8 move 30 steps turn right 45 degrees change color effect by 10
CompareThe copied program and loop program should make the same eight-turn path. The loop version has fewer blocks and one place to edit the pattern.
MisconceptionAsk, “Does repeat 8 make each block happen only once, or does it repeat the entire group eight times?” Have students commit with a thumbs choice before running the code. Trace the first two rounds aloud: move, turn, color; move, turn, color. Emphasize that indentation or being inside the loop shows what repeats. A block left below the loop runs once after all eight rounds, not eight times.
Check for understandingProject a program with move 30 and turn right 45 inside repeat 8, but change color by 10 below the loop. Ask students to write “8” or “1” on paper or type it in chat: “How many times will the color change?” Scan responses, then run it and have students correct their answer if needed.
Guided practice
Have students open the copied eight-pattern starter. In pairs, Driver controls the Chromebook and Navigator names the repeating pattern and checks what belongs inside the loop. Switch roles after the first test.
Prompt“Replace the eight copies with one repeat block. Your program must produce the same movement and color changes as the copied version.” Students run both versions side by side if the workspace allows, or run the copied version before editing and describe the expected result.
CirculateAsk each pair, “What is your loop body?” and “What would you edit if the turn changed to 60?” Look for all three blocks nested inside repeat 8, rather than a repeat block surrounding only move 30.
ScaffoldGive students who are stuck a three-row planning strip: Pattern step 1: move 30. Pattern step 2: turn right 45. Pattern step 3: change color by 10. Repeat count: 8. Have them arrange the three blocks once, then drag that complete group into repeat 8. Model one nested block if the platform’s snapping behavior is a barrier.
ChallengeWhen pairs finish, change only the repeat number from 8 to 4 and predict the difference before running. Then change the turn from 45 to 90 in the loop and explain why one edit changes every round.
Independent work
Students create or modify a working artifact called “Loop Trail.” It must use one repeat loop to make a visible eight-round movement pattern. Required loop body: move at least 20 steps, turn, and one appearance or sound block available in the class workspace. Students choose the values, but must use a repeat count of 8.
WriteIn a comment, project note, or submission response, students complete: “My loop repeats . I used repeat because .” They test the program, then change one block inside the loop and run it again to verify that the change occurs in every round.
ExtensionCreate a second, different repeating pattern using a second loop. Explain why combining both patterns into one loop would not produce the intended result.
SupportStudents may use the three-block starter pattern, change only one value at a time, and use this spoken or written stem: “These blocks repeat together because .” Accept a screenshot of the working blocks plus an oral explanation to the teacher when typing slows a student down.
Closing
Exit ticketStudents receive this code in a response form or on the board:
repeat 5 move 20 steps turn right 30 degrees say “Done”
Students answer: “How many times does the sprite move? How many times does it say ‘Done’? Name the loop body.” Then revise this copied instruction into a loop: “move 10; turn right 90” written four times. Collect responses or check digitally. Students meeting the objective identify 5 moves, 1 “Done,” the two nested movement blocks as the loop body, and place the two-block pattern inside repeat 4.