# Teach a Computer to Draw Shapes

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

http://www.mathsisfun.com/geometry/square.html

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.

http://www.teachertube.com/viewVideo.php?video_id=54152

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

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.

http://www.multiwingspan.co.uk/scratch.php?page=coord

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