Day 29 - Spirals with Loops, Turtle and Basic Math

Today is a simpler project, where we explore spiral designs using loops, the turtle and some basic math.  Time to get creative!

Finished Code

from turtle import *

speed(0)
width(2)
intReps = 95
Screen().colormode(255)

def drawShape(intSize):
    begin_fill()
    left(90)
    circle(intSize)
    right(90)
    end_fill()

for y in range(1,361,20):
    teleport(0,0)
    setheading(y)

    for x in range(1,intReps):
        intColor = int(x/intReps*255)
        color(intColor,intColor,intColor)
        circle((x**2/20),10)
        if (x % 7 == 0):
            drawShape(x/3)

done()