Skip to content
← Back to Community
Here's how to create a turtle project:
Profile icon
awesomel

Creating a Turtle project in Python

Hi all,

Today I'm @Awesomel, going to teach you how to create a turtle project!
So, Let's get started.

First we have four set on instructions together, those are to import the turtle, create a screen for the turtle, create a name for the turtle and a shape for the turtle:
import turtle
wn = turtle.Screen()
Turt = turtle.Turtle()
Turt.shape("turtle")
In this case, the name for my turtle is 'Turt'

In the next set of commands, we create a moving speed and a turning angle of the turtle:
move_speed = (10)
turn_angle = (20)
In this case, the moving speed and the turning angle for my turtle are 10 and 20 respectively.

In the next set of commands, we create forward, backward, left and right functions for the turtle:
def forward():
Turt.forward(move_speed)

def backward():
Turt.backward(move_speed)

def left():
Turt.left(move_speed)

def right():
Turt.right(move_speed)
Here, the moving speed of the turtle is set to our 'move_speed'
command(10)

Next, we tell to the computer or the turtle that 'I will press the up, down, right and left keys to make the turtle move':
wn.onkey(forward, "Up")
wn.onkey(backward, "Down")
wn.onkey(right, "Right")
wn.onkey(left, "Left")
Here, I press the up, down, right and left key to make the turtle move forward, backward, right angle and left angle respectively.

Last but not the least, we tell the turtle to listen to us like how you should listen to your mom and dad:
wn.listen()

And tada! your project is finished!
If you want to refer my project, you can click here

(Click the right, left, up and down buttons on your keyboard to move the turtle)
(Only works on desktop, computer, laptop, pc, mac or mac desktop)

Hope your project will be awesome!
You can share the project with me.
Thanking you all in advance.

Regards,
Awesomel(Not my real name(My profile name))

Voters
Profile icon
awesomel
Profile icon
AdriannaConaway
Profile icon
Samael1
Profile icon
craving964
Profile icon
StarVoyager23
Profile icon
JWZ6
Profile icon
MrVoo
Comments
hotnewtop
Profile icon
ViralZone

This is so overwhelming. This is amazing and highly appreciated. Love it seriously. https://www.tejar.pk/

Profile icon
awesomel

@ViralZone,

Thank you very much ☺. Thank you for the appreciation.

Thanks,
@awesomel

Profile icon
awesomel

Thank you so much, @JWZ6

Profile icon
JWZ6

@awesomel no prob

Profile icon
Pinterestgem

Well I highly appreciate the amount of time you have put in writing this content down. Love this

Highly recommended. Seriously This needs to be appreciated. Love. Five star from my side https://www.tejar.pk/apple-airpods-pro

Profile icon
AGNITRAFOUNDATI

It was difficult to understand the context of the blog's language. It is difficult to understand for novice readers.

VISIT

Profile icon
JohnRob123

Hey there. My blog is a highly credible and informative piece which you can go through. This link can be used to login to the administrator web page for your router. If you'd like access to the administrator page of your router, you can do it via this link.With NFT being a hot subject across the globe software giants are looking to build their users with features in the digital asset format.

Read more:- New Adobe Photoshop Feature BY TeQBlogs

Profile icon
Bestcarebay

This blog was very useful. I have shared it with my fellow bloggers so they can increase their understanding by reading these blogs.The article we'll apply various methods and processes to resolve all issues associated with TotalAV security software.

Read more:- TotalAV Antivirus

Profile icon
PetrErika

Out West coffee is small-batch roasted to maximize flavor: Loring Smart Roasters are the most efficient roasting equipment in the industry. The coffee roasting process used is 80% more efficient and generates 80% less toxic emissions than traditional roasters. Exceptionally precise roasting of the beans ensures the quality of the coffee produced. Our outwestcoffee is packaged by hand.

Visit our website:
https://outwestcoffee.net/

Profile icon
adamslee110

Rjackets brings you the best quality jackets at an affordable price. They have a huge variety of cool and trendy jackets/outfits such as Gaming jackets, Biker jackets, Leather jackets, Movie jackets, Fur jackets, and much more. Visit the website if you want to make a purchase. Peacemaker Jackets

Profile icon
mchvadams

Thank you for uploading I have a website and running my own business where we sell eddie van halen yellow blazer and similar products I need assistance in developing my application.

Profile icon
cristinajohn786

Thankyou for sharing this informative article. i will soon visit again. https://www.famousmoviejackets.com/avengers-endgame-white-uniform-jacket/

Profile icon
ClarkeAdams

Thanks for the article it was very helpful. I was actually looking for a guide to create a turtle project on Light Pink Puffer Jacket for Women and now I can do it thanks to your guide.

Profile icon
lussed

The right angle and left angle respectively, happy wheels
)

Profile icon
JWZ6

cool