Find the motif
Look for the short ordered group that repeats in the target.
Execute a repeated color motif to build an exact target pattern.
Grades 3–5 · Computer Science
Your goal
Build the target strip of 4 beads using a motif of at most 2 beads. Run a repeat loop to match every color in order.
Reduced motion is on. The controls still update the scene.
Build a motif and choose how many times to repeat it. The program will execute the same ordered instructions on every repetition.
The program runs a repeat loop over up to four bead instructions, with at most eight repetitions and 32 output beads. Editing clears the output. Letters on the beads identify colors without relying on color alone. A dark outline marks an output color that differs from the target at that position.
Loop Pattern Studio helps elementary children see how a short instruction block can generate a longer pattern. Students build a motif from red, blue, and yellow beads, choose the repeat count, and execute the loop. The output is drawn beside a target strip so missing beads, extra repetitions, and order errors can be spotted directly. Guided goals introduce motifs of two, three, and four instructions. The visible repeat block and generated bead count connect compact code with its expanded result, while strict bounds keep every run easy to inspect.
Look for the short ordered group that repeats in the target.
The output length is motif length multiplied by repeat count.
Matching bead counts alone is insufficient when their order differs.
Use bounded repetition to compress a sequence of instructions. Ask students to predict what will happen, change one setting, and explain what they observe. Learn gives a starting point. Practice and Challenge offer new goals with the same scene.
An explicit nested repeat executes at most four motif instructions eight times, producing at most 32 beads.