Lesson Plan

Teach a Computer to Draw Shapes

Students learn perimeter, planes, and other geometric concepts
Cameron M.
Technology coordinator
Hoover City Schools
Show More
My Grades K, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12

Students learn important geometry math concepts by teaching a computer to draw a square and other shapes. Programming and logic is also built into this lesson.

Students will be able to...

  • recognize perimeter as an attribute of plane figures 
  • determine the proper angle turn to use to make the requested geometric shape
  • understand how to program a computer to draw shapes using typed in commands and drag and drop
Grades 3 – 5
All Notes
Teacher Notes
Student Notes

1 Hook

Students show prior knowledge by creating a square on the virtual geoboard. 
Students may visit the site at the link below first to refresh their knowledge on squares. 


Then, students will create various shapes on the virtual geoboard and use the Area and Perimeter button to measure the shape.  Here is the link to the geoboard on Math Playground: http://www.mathplayground.com/geoboard.html

2 Direct Instruction

Now students will visit Khan Academy to take what they know about shapes and try teaching a computer to draw a rectangle. https://www.khanacademy.org/hour-of-code/hour-of-code-tutorial/p/intro-to-drawing

In this lesson, students will get a chance to see how to use height and width and location to tell the computer where and how to draw the shape.

3 Guided Practice

Students can watch this tutorial on how to draw a square in Scratch.


They can make connections about the similarities and differences between drawing the shape in the Khan Academy example and drawing a shape in Scratch.

Students can get additional help by going to HELP and viewing the available tutorials and/or Scatch instruction cards. http://scratch.mit.edu/help/cards/

4 Independent Practice

Now students can use the online Scratch program to teach the computer to draw a square. They can use their knowledge to determine the proper angle turns to use. Students can then investigate other commands they can use to change the color or size of the square and attempt to draw other shapes. They can try to find ways to use less programming blocks when drawing the shape to be more efficient.

When the program draws a square, they can upload it to the Scratch website or share with a teacher for feedback.

Students start at the Create button on the website.

5 Wrap-Up

Activity: Investigating

Extenstion Activities:

Visit this page to learn how you can use Scratch to draw on a coordinate plane and learn how to guide a sprite through the maze.


Students may also use their knowledge of area and number of sides of various shapes to create programs to draw additional shapes.