Press Run to see the turtle draw a cool spiral.

import turtle turtle = turtle.Turtle() # 1) Have the turtle go to a different location turtle.goto(0, 0) # 2) change this number to make the turtle draw # more slowly turtle.speed(10) def spiral(size, angle): while size < 300: turtle.forward(size) # 3) change this from turtle.left to turtle.right to # make the turtle draw the other way turtle.left(angle) # 4) change this number to 1 to make the turtle # draw a really tight spiral size = size + 2 spiral(size, angle) break # 5) change these numbers to make the turtle draw a totally # different spiral. Try one of these: # 0, 63 to draw a rose # 50, 101 to draw a crazy spiral star # 25, 70 to draw a spiral that looks 3D spiral(0, 91)
  • Run Code
  • Show Console
  • Codesters How To (opens in a new tab)