2. Starter Activity: Shapes
How many sides do the following shapes have?
1.Square
2.Triangle
3.Hexagon
4.Pentagon
Get The Picture
3. Get The Picture
In this lesson you will use the pen command that
can be used to create graphics. You will create a
number of basic shapes and a pattern through the
use of nested loops.
Lesson
Become more familiar with translating an
algorithm into code
Understand how to create one loop inside another
Use procedures to create a more modular program
Objectives
4. Watch the video Graphics which is in the
programming in scratch folder in Groupwork to
learn how to create some simple computer
graphics (pictures).
Get The Picture
5. Task 9: Shapes
Using Scratch create two programs. The first one
to create the heptagon (7 sides) and the second
one to create the triangle. Before you create the
shapes correctly you will need to identify a
pattern in the below sequence.
Get The Picture
Triangle Square Pentagon Hexagon Heptagon
6. The Rule of Turn
To work out how many degrees you need to make
at each turn, pretend you are walking out the
shape. How many times did you pivot a full 360°?
Divide the total number of degrees pivoted in
plotting the shape by the number of turns taken.
So… in a pentagon, we go round 360° in 5 turns, so
360/5 = 72° per turn.
Get The Picture
7. Task 10: Star
Use the Rule of Turn to draw a five-pointed star.
Think about what the rule said! How many
degrees would you turn? Is it 360°
Get The Picture
8. Task 11: Circular Pattern
Make a pattern out of 36 squares arranged in a
circle of your own.
repeat 36 times
draw a square .......... put your code to draw a square here
turn 10 degrees
Get The Picture
9. Nesting
In the previous task you should have used one
repeat loop inside another – this is called a nested
loop.
The program starts the outer repeat, then enters
the inner repeat, which carries on until it’s finished.
The outer repeat then carries on and so on.
Turn on single stepping (Edit menu) to see this
happening more slowly.
Get The Picture
10. Plenary: Question 1
Look at the code examples
opposite.
a) How many times will sprite
move 10 steps? Why?
b) How many times will sprite
move 10 steps? Why?
Get The Picture
11. Plenary: Question 2
Look at the programs below. What shapes will
they create.
Lesson 4 – Get The Picture
1. 2. 3. 4. 5.
12. Lesson 4 – Get The Picture
Keywords
Become more familiar with translating an
algorithm into code
Understand how to create one loop inside another
Use procedures to create a more modular program
Objectives
Repeat
Nested
Single Stepping
Wait Command
Rule of Turn
Turn
Variables
Angle
Editor's Notes
4 3 6 5
12 The outer loop causes the 3 passes of the inner loop to be completed 4 times – 3 x 4 = 12. 15 12 times in the inner loop + 3 times in the outer loop.