Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Python basics
- # https://docs.python.org/3/library/turtle.html#
- import turtle # imports turtle library
- wn = turtle.Screen()# creates wn as a screen
- wn.bgcolor("lime") # creates a lime screen
- eve= turtle.Turtle() # creates a turtle called eve
- eve.shape("arrow")# changes shape of eve
- eve.color("blue")# changes colour of eve
- eve.penup() # takes eve off the screen
- steps = 20 # variable to control number of steps eve moves
- for i in range(30): # do this 30 times
- eve.stamp() # stamp eve onto the page
- eve.fd(steps) # move eve forward the number of steps in steps
- steps = steps +2 # increase steps by 2
- eve.rt(21) # right turn 21 degrees
- wn.exitonclick() #closes the screen
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement