![]() |
|
For the following program copy the commands into Scratch and run the program. Try to understand how it works.

![]() |
|
Looping
Copy the following program into Scratch and run it.
Look carefully at the instructions.
![]() |
The program starts when the green flag is
clicked. Clear The screen is cleared of any old drawings. Pen Up Make sure the pen is up (we don't want to draw yet). Start in the centre of the screen. Make sure the sprite is facing the right direction (towards the right) Pen Down Put the pen down. Set Pen Color Choose the pen colour. Set Pen Size Choose the pen size. Then we have a loop that repeats the enclosed instructions (move then turn) 6 times. By moving then turning 60 degrees 6 times, we can draw a hexagon. (There are 360 degrees in a full circle, so to do a 6 sided shape we need to turn 360 divided by 6 which equals 60 degrees each turn) |
Loops inside Loops (Nested Loops)
By putting a loop inside another loop we can make the entire hexagon be redrawn many times.
![]() |
Here we have added two more commands to the last program. Add the commands into your program and see the effect they have. After drawing each hexagon, we will turn 10 degrees before drawing the next one. We repeat the 10 degree turn 36 times, thus completing a full 360 degree circle.
|
![]() |
|







