Python Beginner Project Tutorial - Turtle Racing!

  Рет қаралды 61,091

Tech With Tim

Tech With Tim

Күн бұрын

Пікірлер: 97
@vanbeek62
@vanbeek62 3 жыл бұрын
Love this little program! I like to add a little finish line in the init_turtle function so it's more clear who won. Something like: # create finish line finish = turtle.Turtle() finish.color('black') finish.shape('arrow') finish.speed(0) finish.penup() finish.setpos(-WIDTH//2, HEIGHT//2 - 20) finish.pendown() finish.forward(WIDTH)
@Searchland1
@Searchland1 3 жыл бұрын
Hi Tim. Please bring more sessions like this one. It's great to follow your explanations and tips while you build the code. Keep up with the good work.
@mortuumhagl8012
@mortuumhagl8012 3 жыл бұрын
Hmmm... You know what would be interesting? To have a series of random projects like this, beginner intermediate or advance, and do some of these videos whenever you want / whenever you got nothing else better to do Yea... I know you have some projects on this channel but, you should keep doing these, they are awsome
@mr-engin3er
@mr-engin3er 3 жыл бұрын
Waiting for a series on Artificial intelligence with Python (beginner to advanced).
@AgentRex42
@AgentRex42 3 жыл бұрын
It would be fun to cross AI and game.
@CodeWithJoe
@CodeWithJoe 3 жыл бұрын
leran keras and tensorflow
@johnvardy9559
@johnvardy9559 3 жыл бұрын
Im bad on mathematics, its possible i work with AI???
@CodeWithJoe
@CodeWithJoe 3 жыл бұрын
@@johnvardy9559 not with that attitude. and math is overrated, you better get good in understanding algorithms and how to apply them. 99% of the time you dont need math other than to understand what the algorithm does
@johnvardy9559
@johnvardy9559 3 жыл бұрын
@@CodeWithJoe 🙏 thank so much, your answer give me much Motivated,to go on it.
@Cloud-tq5lj
@Cloud-tq5lj 3 жыл бұрын
Wow 1 hour?! I went through this whole video and it felt like 10 minutes.
@ploxl1441
@ploxl1441 2 жыл бұрын
Regarding the create turtles function, i achieved the same result without using enumerator specifically. Define the spacing, define the startposx, and just add spacing to startposx in each enumeration of the for loop. Another sidenote: Turtle.Color() returns a tuple of (pencolor, fillcolor), so returning the winning color can be as easy as return racer.color()[0] def create_turtles(colors): turtles = [] spacingx = WIDTH // (len(colors) + 1) startposx = -WIDTH // 2 + spacingx startposy = -HEIGHT // 2 + 20 for c in colors: t = turtle.Turtle() t.color(c) t.shape("turtle") t.left(90) t.penup() t.setpos(startposx, startposy) t.pendown() turtles.append(t) startposx += spacingx return turtles
@lauralevin5535
@lauralevin5535 3 жыл бұрын
The only other thing I might add is the possibility of a tie. If that happens this program would always show the first color as the winner .
@tcgvsocg1458
@tcgvsocg1458 3 жыл бұрын
What a notification from tech with.....yeeeEEAAHH!!!! PYGAME! Please can you try to create "street of rage" level 1 game please
@parth2teja
@parth2teja 3 жыл бұрын
beginner full kivy tutorial please 🙃
@chikanmao8326
@chikanmao8326 3 жыл бұрын
theres already another one
@parth2teja
@parth2teja 3 жыл бұрын
@@chikanmao8326 Thats very old... Also I'm asking him to make a complete project like he did with django, flask and pygame
@paulthomas1052
@paulthomas1052 3 жыл бұрын
Great demo. Thanks.
@heleenziyad324
@heleenziyad324 3 жыл бұрын
can any one explain this for me i dont get it racer.setpos(-WIDTH//2 + (i + 1) * spacingx , -HIGHT//2 + 100)
@harshmirdhwal
@harshmirdhwal 3 жыл бұрын
Please make videos on raspberry pi pico projects with tinyml
@Hiyori___
@Hiyori___ 2 жыл бұрын
thanks for the fun tutorial
@polunochNY
@polunochNY 3 жыл бұрын
How i can change icon of window? help please!
@hakor_
@hakor_ 2 жыл бұрын
I am havin a little issue even when I copy your code. Basicaly when a turtle won, there just spawn new turtles and start racing while the previus turtles are still on the screen. Anyways, brilliant video!
@rocha1926
@rocha1926 3 жыл бұрын
thankss from brazil
@treasuretayo8142
@treasuretayo8142 3 жыл бұрын
I love this so much
@videokriitikko5509
@videokriitikko5509 3 жыл бұрын
Very good!
@MrMikaXL
@MrMikaXL 2 жыл бұрын
can we add that game in a html file with pyscript?
@humanshahalovesharks5396
@humanshahalovesharks5396 3 жыл бұрын
Uhm, I ran the code on python and nothing happens(I used the download link)
@yashchaube2815
@yashchaube2815 3 жыл бұрын
Can we simulate this race simulator via multithreading ..... if it makes sense.
@CodeWithJoe
@CodeWithJoe 3 жыл бұрын
Why do my turtles race twice?
@basicallybrand
@basicallybrand 3 жыл бұрын
What cursor do you use? I have seen some videos of your and sometimes your cursors turns black?
@teshou4474
@teshou4474 3 жыл бұрын
Waiting for a React series!
@rafastepien4058
@rafastepien4058 3 жыл бұрын
Thanks mate
@redheadedmoos1204
@redheadedmoos1204 3 жыл бұрын
Hey Tim do u know GD script? If u do can u make a tutorial on it
@josemarmelo1942
@josemarmelo1942 Жыл бұрын
Can I put names on turtles? :-)
@nadiashams8614
@nadiashams8614 3 жыл бұрын
Hey Tim! Please make a tutorial on Jarvis by Python....
@DreaminBig
@DreaminBig 3 жыл бұрын
If statement galore
@Param3021
@Param3021 3 жыл бұрын
What a conincidence! Today at afternoon I thought that now I will learn and make projects through turtle module and here you make it. It is a magic, Thank you so much for this video. ♥️
@DziqneR
@DziqneR 2 жыл бұрын
for some reason my turtles are overlapping each other when i run the program
@evilish7
@evilish7 3 жыл бұрын
Perfect Tim, good job! Thanks dude.
@jatingera924
@jatingera924 3 жыл бұрын
Maybe I would be that fast in completing my homework as fast I clicked any youTube notification 🥺
@sachinsinghal13
@sachinsinghal13 3 жыл бұрын
Hey Tim, Thank you so much for this video. This was a really helpful and useful video. Though, I slightly changed my code. I always replace 'print' with pop up windows like turtle.numinput, showinfo from tkinter, showwarning from tkinter. Though tkinter and pygame don't work together in the sam game like tkinter and turtle.
@Eric196910
@Eric196910 3 жыл бұрын
12:55 You thought that you were further in the program than you were in reality I think? Very good tutorial by the way. This is how you can easily learn and have fun at the same time.
@SkilledApple
@SkilledApple 3 жыл бұрын
I appreciate the constant high-quality guides. I'm still going through your learning python playlist but you have SO MANY interesting project videos and explanations that I get sidetracked a lot lol. Thank you, Tim!
@andreaspatounis5674
@andreaspatounis5674 3 жыл бұрын
I am the luckiest person in the earth I saw it 100 times and 99 times I was able to guess which turtle will win. I just took the video back 100 times
@lewparn77777
@lewparn77777 2 жыл бұрын
Thank You very much for the help with the project. I wanted to do something not related to pygame that I would enjoy and it is perfect. I undertsand how def works because of you! I thought doing this wouldn't be good for learning since I am copying line for line but turns not. Thanks very much Tim
@rishabhyadav187
@rishabhyadav187 Жыл бұрын
11:08 How the program came out of While loop as you didn't use the break statement after desirable condition. Could plz explain .
@ashishdisawal3443
@ashishdisawal3443 3 жыл бұрын
Mine is not working someone pls tell what is wrong, here is my code: def get_number_of_racers(): racers = 0 while True: racers = input('Enter the number of racers(2-10): ') if racers.isdigit(): racers = int(racers) else: print("Input is not numeric.... Try again") continue if 2
@aunrizvi8063
@aunrizvi8063 Жыл бұрын
Can anyone help me to fix the error I am getting , "if 2
@typeterson8376
@typeterson8376 3 жыл бұрын
What are the odds that this video was literally perfect for my newest CS project. We did a turtle project earlier and this time we have to take the same scene and create different outcomes based off of user input, just like how this will make different turtles based off the input. Thank you muchly
@tamasinford5022
@tamasinford5022 3 жыл бұрын
This is a great project idea! Younger kids learning Python will love it.
@cngrsn2879
@cngrsn2879 3 жыл бұрын
you arethe best other guys just talk some nonsence
@afraidcone
@afraidcone Жыл бұрын
Scion is my favorite color.
@wafflestechfinance6354
@wafflestechfinance6354 3 жыл бұрын
Great video!
@AlanTheGreater1
@AlanTheGreater1 3 жыл бұрын
Nice video. Would be awesome if you implemented multithreading on this project!
@AlanTheGreater1
@AlanTheGreater1 3 жыл бұрын
Inheretence is nice: class RacingTurtle(turtle.Turtle): def __init__(self, color): super().__init__() self.shape('turtle') self.color(color) self.pencolor('black') self.penup() self.left(90)
@AjayYadav-cf9do
@AjayYadav-cf9do 3 жыл бұрын
Can you please make a video on Network Automation using Python. I must say....it will be challanging for you.
@kavitharajni8962
@kavitharajni8962 3 жыл бұрын
it will make him more legendary if he does it. I hope you heard him Tim!
@AjayYadav-cf9do
@AjayYadav-cf9do 3 жыл бұрын
Common Tim, let's go for it. Waiting for a good network automation project. May be I could contribute to it😉
@AdityaSen
@AdityaSen 3 жыл бұрын
Please make a video on VM, Creating virtual machine using Hypervisior.
@angelchaple1108
@angelchaple1108 3 жыл бұрын
im having an issue with the amount of turtles racing. Although Im inputting a different amount it alway runs with 10. I've double checked the code a couple times and Im not seeing any issue. What could cause this?
@AyushSingh-vj6he
@AyushSingh-vj6he 3 жыл бұрын
Hey, Many python programmer will just copy the code and put on their LinkedIn, github... So if you're copying plz add vast functionality rather than tech with tim.
@andrewlee9108
@andrewlee9108 3 жыл бұрын
How do you make python have different colors for different words like that? Im using VS code and I have some colors but not as varied as yours. for example, the print is cyan and if,return are red on yours.
@Daniel14Mejia
@Daniel14Mejia 3 жыл бұрын
alright guys, now try to make the same way but instead of going upwards, make the winner the one who gets out of the circle the fastest
@hybrid8714
@hybrid8714 3 жыл бұрын
Hey Tim, just wanting to ask how you can generate coordinates or an array of co-ords (from literally a windows laptop screen) in python using a mouse and without installing/ getting the Pymouse program. Thnx!!
@Pete-da-peter
@Pete-da-peter 3 жыл бұрын
I get bored reading books. Please I learned more by doin project. Drop more videos please. I'm begging u
@huntermacias2023
@huntermacias2023 3 жыл бұрын
Created a very similar project on my channel ! Dope video!
@andreaspatounis5674
@andreaspatounis5674 3 жыл бұрын
51:47 or we can just make it random which turtle starts first
@sonalikumari6020
@sonalikumari6020 3 жыл бұрын
i coudn't get that 'screen' attribute in my turtle module^^, can someone send help ?
@Cloud-tq5lj
@Cloud-tq5lj 3 жыл бұрын
As long as you have the 'import turtle' line at the top of your code, it should work
@sonalikumari6020
@sonalikumari6020 3 жыл бұрын
@@Cloud-tq5lj I already had done that but it's showing error ,idk where it's missing.ಠ ೧ ಠ
@tuna_nuke
@tuna_nuke 3 жыл бұрын
@@sonalikumari6020 same
@jatingera924
@jatingera924 3 жыл бұрын
What are you using usual python idle Or any other code editor, check your interpreter path, it would resolve the issue. Hope you have figured it out by now
@py_tok5589
@py_tok5589 3 жыл бұрын
done, good excercise
@davidbock6276
@davidbock6276 2 жыл бұрын
Can u make a playlist with all beginner projects?
@ANNGUYEN-cw7lw
@ANNGUYEN-cw7lw 3 жыл бұрын
Thank you instructor very much. Awesome
@pierrehavard3237
@pierrehavard3237 3 жыл бұрын
Like this kind of video please continue
@ithahu4988
@ithahu4988 3 жыл бұрын
Thanks for another easy to understand tutorial Tim
@mikeafter5
@mikeafter5 2 жыл бұрын
Thanks - I'll review lists now.
@thedoughnutconnoisseur
@thedoughnutconnoisseur 3 жыл бұрын
Amazing Tutorial :), you earned a sub
@RashidKhan-vc6lk
@RashidKhan-vc6lk 3 жыл бұрын
Sir, please i want more tutorials like this for practice
@karial
@karial 3 жыл бұрын
Second! Love your stuff tim
@melissaleigh3013
@melissaleigh3013 3 жыл бұрын
Remember the “i like turtles” kid 😂
@cambridgebreaths3581
@cambridgebreaths3581 3 жыл бұрын
MATLAB miniseries please.
@nyonyomyint2481
@nyonyomyint2481 2 жыл бұрын
What a great explanation.
@ibrahimkabeer9513
@ibrahimkabeer9513 3 жыл бұрын
Waiting for AI in python
@AdityaSen
@AdityaSen 3 жыл бұрын
That was awesome. thanks Tim
@CyberZyro
@CyberZyro 3 жыл бұрын
another one , great !
@elvinsadikhov104
@elvinsadikhov104 3 жыл бұрын
Thanks man,well done
@johnvardy9559
@johnvardy9559 3 жыл бұрын
Thanks you hero 🙂
@User-ts2jj
@User-ts2jj 3 жыл бұрын
Sometime in the future can you do another project for begginers who already know the python basics(like OOP, loops etc)
@AgentRex42
@AgentRex42 3 жыл бұрын
He made a checkers. But yea it's not really for beginners
@DGHere12
@DGHere12 3 жыл бұрын
Hello
@julianbarreraz5576
@julianbarreraz5576 3 жыл бұрын
Hey Tim, I completed the code but I am having difficulty with line 55 which is racers = get_number_of_racers(), and also line 12 which says if racers.isdigit(): . I followed your video and got the screen to pop up, but now it is giving me errors. If anyone else can help me that would be greatly appreciated.
@dushyantsharma4912
@dushyantsharma4912 3 жыл бұрын
Hey tim, I am first!
2 YEARS of PYTHON Game Development in 5 Minutes!
4:54
Coding With Russ
Рет қаралды 925 М.
The Best Python Project For Beginners! (Full Tutorial)
59:39
Tech With Tim
Рет қаралды 128 М.
Players vs Corner Flags 🤯
00:28
LE FOOT EN VIDÉO
Рет қаралды 69 МЛН
Поветкин заставил себя уважать!
01:00
МИНУС БАЛЛ
Рет қаралды 6 МЛН
Amazing Parenting Hacks! 👶✨ #ParentingTips #LifeHacks
00:18
Snack Chat
Рет қаралды 22 МЛН
10 Python Functions That Will Simplify Your Life
19:19
Tech With Tim
Рет қаралды 54 М.
I made Games with Python for 10 Years...
28:52
DaFluffyPotato
Рет қаралды 338 М.
20 Programming Projects That Will Make You A God At Coding
14:27
The Coding Sloth
Рет қаралды 1,1 МЛН
OpenAI’s New ChatGPT: 7 Incredible Capabilities!
6:27
Two Minute Papers
Рет қаралды 198 М.
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Internet Made Coder
Рет қаралды 1,6 МЛН
5 Useful F-String Tricks In Python
10:02
Indently
Рет қаралды 309 М.
Make Pong With Python!
1:12:42
Tech With Tim
Рет қаралды 116 М.
Learn Python Classes With a Text-Based Battle - OOP Tutorial
15:25
Ork Slayer Gamedev
Рет қаралды 154 М.
Grow Fractals in Python! Turtle Graphics
8:01
Coder Space
Рет қаралды 21 М.
Players vs Corner Flags 🤯
00:28
LE FOOT EN VIDÉO
Рет қаралды 69 МЛН