Teaching article

Name a command block so it can be reused consistently

Name a sequence once and use that name in a larger program.

A short name can stand for a defined sequence in several places. Keep the definition visible and expand it when checking, so the name simplifies communication without quietly changing meaning between uses.

Define the block. Invoke it in two places. Expand to verify.

A block name promises the same commands each time

'Corner' can mean forward then right-turn in this notation.

Keep the block definition unchanged when reusing it. A named sequence is useful because readers can rely on the same meaning each time.

A block name needs a visible definition.

What commands does the name represent? Use one reusable block.

Resources

Further reading

Read next

Explore Coding and computational thinking. Browse all teaching articles.