Python Turtle Cheat Sheet: Start Up Turtle Change Your Pen Colour & Size
Python Turtle Cheat Sheet: Start Up Turtle Change Your Pen Colour & Size
myTurtle.setx(pos) # set myTurtle’s x pos wn.exitonclick() # Wait for the user to click on the window to close it
myTurtle.sety(pos) # set myTurtle’s y pos
Want to know more? Use help(turtle), help(wn) and help(myTurtle) to
dir = myTurtle.heading() # stores myTurtle’s heading in the dir variable
have a look at the other methods available.
myTurtle.setheading(dir) # sets myTurtle’s heading