CEMC Banner

Problem of the Week
Problem B and Solution
A Spritely Shape

Problem

Peyton used a block coding program to get a sprite character to draw a shape. His sprite followed these steps:

  1. Put pen down to write

  2. Move \(10\) steps forward

  3. Turn clockwise \(60\degree\)

  4. Repeat steps \(2\) and \(3\) five more times

Here is the sprite’s drawing partway through the program:

A line segment directed up and to the right begins as a solid line then changes to a dotted line. At the point where the line changes, another shorter line segment extends down and to the right. A rounded arrow points from the dotted line to the shorter line segment with a 60 degree angle marked between them. A sprite sits on the end of this shorter line segment.

  1. What type of polygon did the sprite draw?

  2. What type of pattern did Peyton use in this code?

  3. If the code were changed so that step \(3\) reads "Turn clockwise \(45\degree\)", how would Peyton need to change step \(4\) in order to create a closed polygon?

Solution

  1. The sprite moved \(10\) steps forward and then and turned \(60\degree\) clockwise a total of six times. By doing this, the sprite created a regular hexagon (with interior angles of \(120\degree\), which sum to \(720\degree\)). The completed hexagon is shown below.

    Dotted lines extend each of the sides of a regular hexagon. Each dotted line makes a 60 degree angle with the next side of the hexagon. An interior angle of 120 degrees is shown at one vertex of the hexagon.

  2. Peyton used a repeating pattern in this code; continuing will retrace the hexagon.

  3. If the code were changed so that step \(3\) reads "Turn clockwise \(45\degree\)", Peyton would have to revise step \(4\) to "Repeat steps \(2\) and \(3\) seven more times”, thus creating a regular octagon (with interior angles of \(135\degree\), which sum to \(1080\degree\)). The completed octagon is shown below.

Dotted lines extend each of the sides of a regular octagon. Each dotted line makes a 45 degree angle with the next side of the octagon. An interior angle of 135 degrees is shown at one vertex of the octagon.