Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to import turtle in python

import turtle # imports it
whateverYouWantToCallIt = turtle.Turtle() # adds it to the project
#code
whateverYouWantToCallIt.forward(10) # moves whateverYouWantToCallIt forward
whateverYouWantToCallIt.color("purple") # color
whateverYouWantToCallIt.left(90) # turns him 90 degrees
whateverYouWantToCallIt.right(90) # turns him 90 degrees the other direction
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #import #turtle #python
ADD COMMENT
Topic
Name
7+4 =