CEMC Banner

Problem of the Week
Problem B
A Spritely Shape

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?

Theme: Computational Thinking