python turtle
import turtle
myTurtle = turtle.Turtle()
myTurtle.forward(100)
myTurtle.right(90)
myTurtle.forward(100)
python turtle
import turtle
myTurtle = turtle.Turtle()
myTurtle.forward(100)
myTurtle.right(90)
myTurtle.forward(100)
Python Turtle Example
import turtle
t = turtle.Pen()
t.speed(0) #drawing speed
t.shape("turtle")
t.pencolor("green")
t.pensize(2)
t.lt(90) #to make sure turtle is facing north at the start
for x in range (12):
for y in range (36):
t.fd(20)
t.rt(10)
t.rt(30)
t.fd(20)
python turtle
import turtle
tina=turtle.Turtle()
#trinket.io specializes in these stuff
turtle python
>>> tp = turtle.pos()
>>> tp
(0.00,0.00)
>>> turtle.setpos(60,30)
>>> turtle.pos()
(60.00,30.00)
>>> turtle.setpos((20,80))
>>> turtle.pos()
(20.00,80.00)
>>> turtle.setpos(tp)
>>> turtle.pos()
(0.00,0.00)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us