Skip to content

Instantly share code, notes, and snippets.

@aurelianonava
Created September 2, 2014 21:29
Show Gist options
  • Save aurelianonava/598775ba7d0c45ad6c1d to your computer and use it in GitHub Desktop.
Save aurelianonava/598775ba7d0c45ad6c1d to your computer and use it in GitHub Desktop.
Turn turtle left 90 degrees.
import turtle
t = turtle.Pen()
screen = t.getscreen()
#Hide turtle disabled
#t.hideturtle()
# the # pound symbol is used to insert single-line comments
# draws at center of stage
t.fd(100)
t.write(t.position(), True, align="left")
#moves forward 100 pixels
t.fd(100)
#turn turtle left 90 degrees
t.left(90)
#Exits screen with mouse click event
screen.exitonclick()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment