Python Turtle Graphics Tutorial #3 - Key Presses & Events

preview_player
Показать описание
In this video I continue my tutorial on the turtle module in python. The turtle graphics module has built in functionality to listen to events and detect key presses. This allows for us to move the turtle object via user input and create some interesting shapes.

Download and see all the code for this video below...

**************************************************************

**************************************************************

Please leave a LIKE and SUBSCRIBE for more content!

Tags:
- Tech With Tim
- Python Tutorials
- Turtle Module
- Python Turtle
- Python Turtle Tutorial
- Turtle Python
Рекомендации по теме
Комментарии
Автор

while True:
print("Thanks Tim!")

hope It runs forever

houda
Автор

I love this channel its made everything in python more clear

FeedFall
Автор

Heres someing that I would recommend: Make a user input and tell the user to enter the amount of pixels they want the turtle to move. To make this work you would hsve to change the 100 in the forward to the user inputs name.

yeahyeah
Автор

thank you very much sir! this tutorial was great. in most videos no one teach us why we write the program like that or like this. But in your videos you explain the program step by step and it's highly appreciated...

RoboticswithSanula
Автор

thankies, youre a gem! I gather this better with you than in class.

loneghostkitten
Автор

Thank you this is so helpful. I'm struggling in my class, but this has helped a lot!
And a side note observation, there's a lot of annoying ads popping up throughout the video. Has anyone else noticed? More so than the previous ones.
Oh well.
Thanks again!

courtneyt
Автор

Tim, your the best coding master, You deserve 30million subs

aleclesemann
Автор

just love the way you made things very man

vishweshrai
Автор

It seems like the first and third lines of your program are redundant. If you are using just one turtle object, you can simplify your code a lot by using 'from turtle import *' statement without the 'import turtle' statement in the first line of code. This command loads the turtle module into you default namespace, and a default turtle is set up for you. So, you won't need the statement 'tim = turtle.Turtle()' to declare your own Turtle object. Additionally, you won't need to specify your Turtle object by prefixing all your turtle commands with 'tim.'. However, if you are planning to use 2 or more turtles, you should instantiate each one using a different name and that way you can specify which turtle you want the command to act upon by using the object name ('tim.' in your example). Other than that, this was an interesting Python turtle graphics tutorial. Most such demos just show how to plot spiral or star patterns, etc. I like the direction you are going with this series.

randmorf
Автор

Thank You!! The Best Channel to learn PYTHON!

syedjafri
Автор

This is so well done. Thank you so much for this!

Vejinx
Автор

Me: sees an add about beginner coding app that costs money.

also me: But i have Tech With Tim??

flaminfox
Автор

thanks, Tim, want more on the turtle series.

rubayetalam
Автор

Thank you man, your video help me a lot. Respect 🔥🔥

xrsotqf
Автор

Thanks so much. website code also helped a lot.

conermos
Автор

Thank you so much for this great video. It helped a lot.

tamashee
Автор

I added a function and a listener for when the user clicks the turtle. But it only works if you click the turtle's starting position (ie 0, 0) regardless where the turtle moves to.
This is what I added:

def click_left_turtle(x, y):
print("You clicked turtle")

turtle.listen()
turtle.onclick(click_left_turtle, 1)

userdetails
Автор

Thanks for he lesson, it really helped! 👍

akiranorakage
Автор

Why didn’t they make up 0 and down 180? That would be more like compass headings.

gillianorley
Автор

How can you do the same with more than 1 turtles

pv