Python Beginner Project Tutorial - Turtle Racing!

preview_player
Показать описание
Welcome this Python beginner project video! In this video, I'll be showing you how to create a graphical application, and develop a turtle racing program using the python turtle module! The user picks how many turtles they want to race, and the program will race that many turtles by randomly moving them across the screen. This tutorial is perfect for beginners, and is more in depth than a basic "hello world" program.

📄 Resources 📄

⭐️ Timestamps ⭐️
00:00 | Introduction and Project Demo
02:56 | Project Requirements
04:43 | Getting User Input For # of Racers
12:22 | Setting Up Turtle & The Turtle Screen
17:07 | Creating and Moving a Turtle
19:08 | Turtle Methods and Functionality
27:26 | Creating Our Turtle Racers
36:26 | Turtle Starting Position Calculation
43:46 | Racing Our Turtles

◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
💰 Courses & Merch 💰

🔗 Social Medias 🔗

🎬 My YouTube Gear 🎬

💸 Donations 💸
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️

⭐️ Tags ⭐️
- Python program
- Python for beginners
- Tech With Tim
- Coding tutorial
- Coding for beginners
- Basic Python

⭐️ Hashtags ⭐️
#Python #TechWithTim
Комментарии
Автор

Waiting for a series on Artificial intelligence with Python (beginner to advanced).

mr-enginer
Автор

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)

vanbeek
Автор

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.

Searchland
Автор

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. ♥️

Param
Автор

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!

SkilledApple
Автор

Wow 1 hour?! I went through this whole video and it felt like 10 minutes.

Cloud-tqlj
Автор

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

typeterson
Автор

This is a great project idea! Younger kids learning Python will love it.

tamasinford
Автор

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

mortuumhagl
Автор

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.

Eric
Автор

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

lewparn
Автор

Thanks for another easy to understand tutorial Tim

ithahu
Автор

Amazing Tutorial :), you earned a sub

thedoughnutconnoisseur
Автор

Thank you instructor very much. Awesome

ANNGUYEN-cwlw
Автор

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.

sachinsinghal
Автор

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

ploxl
Автор

Like this kind of video please continue

pierrehavard
Автор

Created a very similar project on my channel ! Dope video!

huntermacias
Автор

What a notification from tech PYGAME!
Please can you try to create "street of rage" level 1 game please

tcgvsocg
Автор

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!!

hybrid