0% found this document useful (0 votes)
12 views12 pages

Scratch Workbook: Drawing Shapes Module

Uploaded by

verahcate5
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views12 pages

Scratch Workbook: Drawing Shapes Module

Uploaded by

verahcate5
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module 2

Drawing Shapes
and Repeating
Think Like a Computer 2
Exercises 3
Could You Repeat That Please? 6
Exercises 7
Over and Over Again 8
Exercises 9
End of Module Quiz 10

This workbook is available for free download for personal and educational use thanks to a generous grant by ICS Skills. It is distributed under a
Creative Commons Attribution-Non Commercial-NoDerivs licence, which means that you are free to copy, distribute, and display the workbook
provided you make no changes to the content (including the attribution to the authors and these license terms); you may not use this workbook for
commercial purposes, and you may not alter, transform, or build upon this work. We encourage the use of this material in educational settings, and
you are welcome to print your own copy of the book and distribute worksheets from it to students. We welcome enquiries and suggestions, which
should be directed to the authors (see [Link]/educationoutreach).

Version 2.01 MMXI:III:XXIV © 2011 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.

2 | 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 | 3
o

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?

4 | Scratch Workbook
p 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 | 5
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.

Like any programming language, Scratch code is executed very quickly. The debugger highlights the
code step by step as things happen on the stage. This is useful to help you understand a script by seeing
the order of how it executes. It can also help to pinpoint where changes need to be made if there are
problems reaching your solution.

6 | Scratch Workbook
Exercises

n 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?

o Use Scratch to draw a circle and pentagon side by side on the stage as shown in the image below.
Don’t forget to use the single stepping command to help you.

Module 2 | 7
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.

8 | Scratch Workbook
Exercises

n 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.

Draw 4 shape pattern 2 times

Draw squares 4 times

Draw 4 lines to make a square

o Use Scratch to draw the shape on the stage as shown in the image below.

Module 2 | 9
End of Module Quiz

n 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.”

o A useful feature in Scratch that lets you run programs one step at a time highlighting each block is
known as

A. Sprite Stepping
B. Single Stepping
C. Script Stepping
D. Scratch Stepping

p Which of the items listed below is not a good reason for software testing?

A. It helps you find bugs in your program.


B. To make sure your program does what you expect.
C. It helps to see if other people can understand and use your program easily.
D. It helps you to find new costumes for a sprite.

q What does this script do?

A. It draws a Square
B. It draws a Hexagon
C. It draws a Triangle
D. It draws a Circle

10 | Scratch Workbook
r Which one of these loops will draw a circle?

Module 2 | 11
Module 2: References

Images used for Think Like a Computer (Page 2) are created by Irish Computer Society

12 | Scratch Workbook

Common questions

Powered by AI

Loops allow repeating a set of instructions multiple times, which reduces redundancy and simplifies code, making it more efficient. This efficiency is crucial in programming as it saves time and reduces the number of errors . In Scratch, using loops helps in executing repetitive tasks quickly by highlighting code step by step, facilitating debugging if problems occur .

The workbook encourages students to improve algorithms by iteratively testing and revising their instruction sets based on outcomes, promoting experiential learning and adaptability . This iterative approach helps develop critical thinking as students analyze discrepancies, identify areas for enhancement, and apply modifications. The process underscores the importance of precision and experimentation in programming .

The exercise of writing instructions for drawing highlights the difference between human and computer interpretations as it requires precision and clarity that humans often overlook, as they might infer meanings and context . Computers, on the other hand, execute instructions exactly as provided, revealing gaps in logic or vagueness that humans might not notice. This task underscores the critical need for exactitude when drafting algorithms, teaching learners to anticipate how a computer will execute their commands .

Using exercises to teach shape drawing with Scratch develops various cognitive skills, such as spatial reasoning, logical thinking, and problem-solving. It encourages learners to interpret and convert algorithms into graphical outputs, fostering an understanding of how programming instructions are translated into visual content . This approach also builds procedural thinking as learners must follow step-by-step processes and revise their algorithms based on feedback .

The 'Single Stepping' feature in Scratch allows users to run programs one step at a time while highlighting each block of code. This approach aids in identifying the flow of the program and any logical errors, thereby enhancing understanding and debugging skills . It provides a clear visualization of how each instruction is executed, which is particularly beneficial for learners new to programming .

Visual tools like Scratch benefit the learning process by providing an intuitive and accessible way to understand programming concepts without the need for complex syntax involved in text-based coding . It allows learners, especially beginners, to focus on logical flow and problem-solving strategies, reducing barriers to entry and facilitating a smoother learning curve. Visual feedback from these tools enhances comprehension and retention of programming logic .

Exercises involving drawing shapes with nested loops deepen understanding of complex programming structures by demonstrating how loops within loops operate. This shows learners how to manage multiple layers of repetition and control flow effectively, crucial for writing concise and efficient code . By visualizing how these structures repeat and interact, students gain insights into how nested loops can be applied beyond simple tasks to solve more elaborate computational problems .

Understanding errors in algorithms is vital because it teaches students how to recognize and resolve mistakes in their logic or code, which is a fundamental aspect of programming . The workbook addresses error identification and correction by encouraging continuous testing and iteration, allowing students to proactively identify where their instructions deviate from the intended result and make necessary adjustments to improve accuracy .

Algorithms provide a structured way to solve problems by offering clear sets of instructions that can be executed by computers, which helps students understand the precision required in programming. However, a limitation is that if the instructions are incorrect, computers will still follow through, leading to unexpected results . Understanding these aspects helps students appreciate the importance of accurate syntax and logic in computational thinking .

Testing plays a crucial role in reinforcing the understanding and improvement of algorithms by allowing students to verify that their solutions produce the expected results. It highlights the iterative nature of programming where debugging and refining are essential to achieving desired outcomes . Through testing, students learn the importance of validation and verification in software development, crucial skills for both problem-solving and quality assurance .

You might also like