python libraries turtle code example
Example 1: how to import turtle in python
import turtle
whateverYouWantToCallIt = turtle.Turtle()
whateverYouWantToCallIt.forward(10)
whateverYouWantToCallIt.color("purple")
whateverYouWantToCallIt.left(90)
whateverYouWantToCallIt.right(90)
Example 2: python turtle tutorial
>>> turtle.position()
(0.00,0.00)
>>> turtle.backward(30)
>>> turtle.position()
(-30.00,0.00)
Example 3: python turtle tutorial
>>> turtle.heading()
22.0
>>> turtle.right(45)
>>> turtle.heading()
337.0