Skip to main content

Code Shapes in Scratch

Main Image
Information Technology

Learners develop decomposition, pattern recognition and algorithmic thinking by using their knowledge of simple geometric figures to code shapes in Scratch.

What You Need

Guide:

Safety Notes

Ensure you are familiar with Let's Talk Science's precautions with respect to safe delivery of outreach to youth. 

What To Do

  1. Learners can work independently, or in groups of two to three. Ask educator to group learners, if applicable. 
  2. Learners access the website Scratch to create an account and sprite. Visit the Scratch Tips guide to teach learners how to do this. 
  3. Once an account and sprite have been created, learners create different shapes by developing custom code blocks to define shapes, as follows. 

NOTE! The table below was sourced from How to draw shapes with the pen and learners can access the pen extension via the bottom left of the create project page, by clicking the blue box with a ‘+’ and clicking the pen extension (to allow their sprite to draw).  

Square 

Create a custom block to draw a square where the top-left corner will be the sprite's current position and the top side will be pointed sprite's current direction. Define size with a number. 

 

Rectangle 

Create a custom block to draw a rectangle, with the current sprite's position as the top left corner and rotated in the current sprite's direction. Define height and width with numbers. 

Circle 

Create a custom block to draw a circle. Define size with a number. 

By creating geometric shapes using Scratch, learners use decomposition skills, pattern recognition and algorithmic thinking. Learners ‘decompose’ their knowledge of shapes to create and follow code to build new shapes. Understanding that shapes repeat their sides, allows learners to use repetition in the code. Sequences involve tasks which are repeated and/or only occur under certain conditions. The steps in an algorithm always follow a sequence. Simple, linear sequencing is one of the first concepts learned when coding, which learners achieve through completing this activity! Learners also further develop critical thinking, testing and evaluation skills through this activity. 

As technology advances, it is more important than ever that people contribute to the digital world. Building computational thinking skills, critical thinking, decomposition, pattern recognition, testing and evaluating skills, better prepare learners for the real and the digital world. Being able to think critically is an important skill to have that helps learners become constructive citizens and interact with the world in meaningful ways.   

Learning how to build things and code is a good skill to have as computers are becoming more and more important in the workforce. Recognizing patterns is important in the real and digital world, as it can help people make predictions based on observations. Computer programmers use pattern recognition to make their programs more efficient. 

  • Encourage learners to draw a triangle by following the square code, but making some adjustments: 
    • For the ‘repeat code’, choose three sides instead of four. 
    • Then change the ‘90 degrees’ to ‘120 degrees.’ 
  • Encourage learners to remix their code, based on these questions: 
    • Can you change the pen colour or size? 
    • Can you add sounds to your code? 
    • Can you make the shapes different sizes? 
    • Can you put your shapes together to make something, such as a house? 
  • Encourage learners to try building other shapes.  

What's Happening?

By creating geometric shapes using Scratch, learners use decomposition skills, pattern recognition and algorithmic thinking. Learners ‘decompose’ their knowledge of shapes to create and follow code to build new shapes. Understanding that shapes repeat their sides, allows learners to use repetition in the code. Sequences involve tasks which are repeated and/or only occur under certain conditions. The steps in an algorithm always follow a sequence. Simple, linear sequencing is one of the first concepts learned when coding, which learners achieve through completing this activity! Learners also further develop critical thinking, testing and evaluation skills through this activity. 

Why Does it Matter?

As technology advances, it is more important than ever that people contribute to the digital world. Building computational thinking skills, critical thinking, decomposition, pattern recognition, testing and evaluating skills, better prepare learners for the real and the digital world. Being able to think critically is an important skill to have that helps learners become constructive citizens and interact with the world in meaningful ways.   

Learning how to build things and code is a good skill to have as computers are becoming more and more important in the workforce. Recognizing patterns is important in the real and digital world, as it can help people make predictions based on observations. Computer programmers use pattern recognition to make their programs more efficient. 

Investigate Further

  • Encourage learners to draw a triangle by following the square code, but making some adjustments: 
    • For the ‘repeat code’, choose three sides instead of four. 
    • Then change the ‘90 degrees’ to ‘120 degrees.’ 
  • Encourage learners to remix their code, based on these questions: 
    • Can you change the pen colour or size? 
    • Can you add sounds to your code? 
    • Can you make the shapes different sizes? 
    • Can you put your shapes together to make something, such as a house? 
  • Encourage learners to try building other shapes.