Skip to content
← Back to Community
pentagon
Profile icon
AlexOConnor

what is the code for this shape

Voters
Profile icon
JenniferY2
Profile icon
LinchongChen
Profile icon
TejasJoshi6
Profile icon
AlexOConnor
Comments
hotnewtop
Profile icon
ash15khng

First, you need to find the interior angles.
Using (n-2)*180/n: 1 interior angle is 108 degrees.
So using a for loop:

# blah blah setup code for i in range(1,5): turtle.forward(100) turtle.left(108)
Profile icon
ReplTalk

Hey there, please make sure your post body is at least 10 words and 100 characters. That makes it easier for our community to help you!

Profile icon
ReplTalk

Hey there, please make sure your post body is at least 10 words and 100 characters. That makes it easier for our community to help you!