Skip to content

Instantly share code, notes, and snippets.

@henrygarner
Created May 5, 2014 19:31
Show Gist options
  • Save henrygarner/54bf76a089bcbcaf1636 to your computer and use it in GitHub Desktop.
Save henrygarner/54bf76a089bcbcaf1636 to your computer and use it in GitHub Desktop.
import turtle
tim = turtle.Turtle()
def drawSquare(length):
for i in range(4):
tim.forward(length)
tim.right(90)
# Draw 90 squares rotated 4 degrees
for i in range(90):
drawSquare(100)
tim.right(4)
# Draw 45 squares rotated 8 degrees
for i in range(45):
drawSquare(200)
tim.right(8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment