Python and Turtle Difficulty Level 3,for loop Draw Spiral with Python Turtle (Solution Included)

Draw Spiral with Python Turtle (Solution Included)

This classical shape can be programmed easily with a for loop.

Animation of this drawing can be found here:

Code:

import turtle
import colorsys

turtle.setup(700,700)
turtle.title("Spiral - PythonTurtle.Academy")
turtle.speed(0)
turtle.hideturtle()
n=200
s=2
for i in range(n):
    turtle.fd(s)
    turtle.left(119)
    s += 2
Tags:

Related Post