Python and Turtle Difficulty Level 2,for loop,loop Square Spiral with Python and Turtle (Source Code)

Square Spiral with Python and Turtle (Source Code)

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

Square Spiral

Source Code:

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

for i in range(10,1800,6):
    turtle.fd(i)
    turtle.left(89.7)
Tags: ,

Related Post