Scratch3_Workbook_2019_Module_2
Scratch3_Workbook_2019_Module_2
Drawing Shapes
and Repeating
Think Like a Computer 24
Exercises 25
Could You Repeat That Please? 28
Exercises 29
Over and Over Again 30
Exercises 31
End of Module Quiz 32
© 2019 Lero
Think Like a Computer
In Module 1 you learned about algorithms. Algorithms are sets of instructions that solve a problem.
We also learned that humans can interpret instructions in a different way to computers.
Computers work by following lists of instructions, and they do exactly what the instructions say, even if
they are incorrect or nonsensical!!
Go through
the door
please
Go through
the door
please
Try out some exercises that will help you understand how to think like a computer by creating
algorithms. You will execute the algorithms to test how well they work and make any modifications that
are needed to improve the algorithm.
24 | Scratch Workbook
Exercises
Describe how to draw this picture above using written instructions only in the box below.
Read out your instructions to a friend who can’t see the picture. Check how closely the picture
drawn by your friend matches the picture above.
Module 2 | 25
Describe how to draw this picture above using written instructions only in the box below. You
should make some improvements based on your experience from exercise 1.
Read out your instructions to a friend who can’t see the picture. Check how closely the picture
drawn by your friend matches the picture above. Were there any improvements made from
exercise 1?
26 | Scratch Workbook
Follow the instructions in this algorithm to draw something in the first box below.
1. Draw a rectangle.
2. From the centre of the rectangle’s uppermost longer side, draw a straight line upwards
perpendicular to the rectangle. This straight line should be the same length as the
longer side of the rectangle.
3. Draw a right-angled triangle on the right hand-side of the perpendicular line.
4. Draw another triangle on the left hand-side of the perpendicular line. This triangle
should be a mirror image of the triangle drawn in step 3.
5. On the top of the page, draw three stars.
Does your picture match the one from the solutions section?
Write a new version of the algorithm including improvements in the box below.
Module 2 | 27
Could You Repeat That Please?
A computer can perform repetitive tasks efficiently. The code written below in Scratch will draw a square.
In the script a loop will repeat the steps of drawing each side of the square and rotate to draw the next
side of the square.
28 | Scratch Workbook
Exercises
In the box provided, explain what each line of code does. What does this code draw?
Use Scratch to write the script. Does it match what you have described in the box?
Use Scratch to draw a circle and pentagon side by side on the stage as shown in the image below.
Module 2 | 29
Over and Over Again
We learned in the previous section that a loop can be used by computers to perform repetitive tasks
efficiently.
Use Scratch to write the script below to draw 4 different shapes 5 times. It uses a loop inside a loop also
known as a nested loop.
**
**
**Note that the pen up
command is used before
the x/y position changed so
that the pen can move to a
new location before drawing
again.
**
30 | Scratch Workbook
Exercises
Use Scratch to draw the shape on the stage as shown in the image below.
Hint: You can draw this shape by using a loop to draw 4 sides of a square, inside a loop to draw 4
squares, contained in a loop to draw the 4 square patterns twice.
Use Scratch to draw the shape on the stage as shown in the image below.
Module 2 | 31
End of Module Quiz
Identify the shape that is described by this algorithm. “Put your pen on paper. Face right . Move
2cm. Face up. Move 0.5cm. Rotate right by 135 degrees. Move 1 cm. Rotate right by 90 degrees.
Move 1 cm. Face up. Move 0.5cm. Face left. Move 2cm. Face up. Move 0.45cm.”
Which of the items listed below is not a good reason for software testing?
A. It draws a Square
B. It draws a Hexagon
C. It draws a Triangle
D. It draws a Circle
32 | Scratch Workbook
Which one of these loops will draw a circle?
A.
B.
C.
D.
Module 2 | 33