Boxi Learn

Boxi Learn › Computing › Stage 2 · Models and Patterns

Draw shapes with loops

CS-2 Hand repeated work to a loopCS-1 Break a big job into small steps
What many people think

To draw a hexagon the turtle turns by the hexagon's inside angle, 120°.

The idea

A regular shape with n sides is 'forward, turn 360°/n' repeated n times.

Try it yourself

Open in a new window ↗

Explain it

A friend says a 10-sided shape needs 20 commands. Show them a loop that draws it, and explain why the turn has to be 36°.

Try at home

Be the turtle: walk 4 steps, turn right a quarter turn, and do it 4 times. Then walk a triangle. How far do you turn at each corner? At the end, check that you face the way you started.

School grade (for reference): China 4 · US 3 · UK (year) 3