Loop Pattern Studio

Execute a repeated color motif to build an exact target pattern.

Grades 3–5 · Computer Science

Explore one idea

Loop Pattern Studio

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.

1 of 3
A repeat 1 block containing no bead instructions, with target and executed outputRepeat 1 timesEmpty blockEnd repeatTarget stripRBRBExecuted outputRun the block to generate its pattern

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.

Learn with Loop Pattern Studio

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.

What to look for

Find the motif

Look for the short ordered group that repeats in the target.

Count repetitions

The output length is motif length multiplied by repeat count.

Inspect order

Matching bead counts alone is insufficient when their order differs.

For teachers and curious learners

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.

← All simulations