Teaching article

A loop repeats the whole block inside it

Replace an exactly repeated command block with a stated repeat count.

Bracket the command group before adding a repeat count. Expanding the loop back into individual commands lets children check whether they repeated the intended sequence or only its most noticeable step.

Repeat 'forward, turn right' four times contains four copies of that block.

Expand the shorthand to verify it

Mark the boundaries of the repeated block clearly. A reader needs to know which commands belong inside the repetition.

Identify a repeated block. Set its count. Expand to check.

A loop repeats the whole enclosed block.

Does expansion match the original? Use two repeats first.

Resources

Further reading

Read next

Explore Coding and computational thinking. Browse all teaching articles.