Python and Turtle Difficulty Level 2,for loop,loop Pentagon Spiral with Python and Turtle

Pentagon Spiral with Python and Turtle

Draw the following spiral with pentagon shape. In each loop, increase the forward length and turn slightly less than 72 degrees.

Pentagon Spiral

Source Code:

import turtle
screen = turtle.Screen()
screen.title('Pentagon Spiral - PythonTurtle.Academy')
turtle.setup(1000,1000)
screen.setworldcoordinates(-1000,-1000,1000,1000)
turtle.speed(0)
turtle.hideturtle()

for i in range(10,1175,4):
    turtle.fd(i)
    turtle.left(71.5)
Tags: ,

Related Post