The turtle module is a graphics library in Python that allows you to control a turtle and draw shapes and patterns on the screen. It is a fun and easy way to get started with programming and computer graphics.
To install Turtle, run this command in your terminal:
$ pip install turtle
Here are some turtle methods
Move and draw
forward() | fd()
backward() | bk() | back()
right() | rt()
left() | lt()
goto() | setpos() | setposition()
setx()
sety()
setheading() | seth()
home()
circle()
dot()
stamp()
clearstamp()
clearstamps()
undo()
speed()
Tell Turtle’s state
position() | pos()
towards()
xcor()
ycor()
heading()
distance()
Setting and measurement
degrees()
radians()
Drawing State
pendown() | pd() | down()
penup() | pu() | up()
pensize() | width()
pen()
isdown()
Color control
color()
pencolor()
fillcolor()
Filling
filling()
begin_fill()
end_fill()
More drawing control
reset()
clear()
write()
Visibility
showturtle() | st()
hideturtle() | ht()
isvisible()
Appearance
shape()
resizemode()
shapesize() | turtlesize()
shearfactor()
settiltangle()
tiltangle()
tilt()
shapetransform()
get_shapepoly()
Using events
onclick()
onrelease()
ondrag()
Special Turtle methods
begin_poly()
end_poly()
get_poly()
clone()
getturtle() | getpen()
getscreen()
setundobuffer()
undobufferentries()
Here are some Methods of TurtleScreen/Screen
Window Control
bgcolor()
bgpic()
clearscreen()
resetscreen()
screensize()
setworldcoordinates()
Animation control
delay()
tracer()
update()
Using screen events
listen()
onkey() | onkeyrelease()
onkeypress()
onclick() | onscreenclick()
ontimer()
mainloop() | done()
Settings and special methods
mode()
colormode()
getcanvas()
getshapes()
register_shape() | addshape()
turtles()
window_height()
window_width()
Input methods
textinput()
numinput()
Methods specific to Screen
bye()
exitonclick()
setup()
title()