Python Beginner Project Tutorial - Turtle Racing!

Поділитися
Вставка
  • Опубліковано 3 лис 2024

КОМЕНТАРІ • 98

  • @vanbeek62
    @vanbeek62 3 роки тому +8

    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 роки тому +7

    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.

  • @Param3021
    @Param3021 3 роки тому +6

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

  • @SkilledApple
    @SkilledApple 3 роки тому +8

    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!

  • @mr-engin3er
    @mr-engin3er 3 роки тому +71

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

    • @AgentRex42
      @AgentRex42 3 роки тому +2

      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 роки тому +6

      @@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 роки тому +2

      @@CodeWithJoe 🙏 thank so much, your answer give me much Motivated,to go on it.

  • @typeterson8376
    @typeterson8376 3 роки тому +1

    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

  • @Cloud-tq5lj
    @Cloud-tq5lj 3 роки тому +13

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

  • @mortuumhagl8012
    @mortuumhagl8012 3 роки тому +5

    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

  • @ploxl1441
    @ploxl1441 2 роки тому +1

    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

  • @tamasinford5022
    @tamasinford5022 3 роки тому +1

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

  • @Eric196910
    @Eric196910 3 роки тому +2

    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.

  • @evilish7
    @evilish7 3 роки тому +3

    Perfect Tim, good job! Thanks dude.

  • @lewparn77777
    @lewparn77777 2 роки тому +1

    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

  • @Blherp
    @Blherp 26 днів тому

    Wow, your video are more hepful than the lessons of my teacher

  • @mikeafter5
    @mikeafter5 2 роки тому

    Thanks - I'll review lists now.

  • @lauralevin5535
    @lauralevin5535 3 роки тому +1

    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 .

  • @ithahu4988
    @ithahu4988 3 роки тому

    Thanks for another easy to understand tutorial Tim

  • @tcgvsocg1458
    @tcgvsocg1458 3 роки тому +1

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

  • @AlanTheGreater1
    @AlanTheGreater1 3 роки тому +1

    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)

  • @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

  • @nyonyomyint2481
    @nyonyomyint2481 2 роки тому

    What a great explanation.

  • @andreaspatounis5674
    @andreaspatounis5674 3 роки тому +1

    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

  • @sachinsinghal13
    @sachinsinghal13 3 роки тому +2

    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.

  • @pierrehavard3237
    @pierrehavard3237 3 роки тому

    Like this kind of video please continue

  • @afraidcone
    @afraidcone Рік тому

    Scion is my favorite color.

  • @paulthomas1052
    @paulthomas1052 3 роки тому

    Great demo. Thanks.

  • @heleenziyad324
    @heleenziyad324 3 роки тому +2

    can any one explain this for me i dont get it
    racer.setpos(-WIDTH//2 + (i + 1) * spacingx , -HIGHT//2 + 100)

  • @AdityaSen
    @AdityaSen 3 роки тому

    That was awesome. thanks Tim

  • @wafflestechfinance6354
    @wafflestechfinance6354 3 роки тому +1

    Great video!

  • @jatingera924
    @jatingera924 3 роки тому +3

    Maybe I would be that fast in completing my homework as fast I clicked any youTube notification 🥺

  • @elvinsadikhov104
    @elvinsadikhov104 3 роки тому

    Thanks man,well done

  • @rishabhyadav187
    @rishabhyadav187 2 роки тому

    11:08
    How the program came out of While loop as you didn't use the break statement after desirable condition. Could plz explain .

  • @karial
    @karial 3 роки тому

    Second! Love your stuff tim

  • @RashidKhan-vc6lk
    @RashidKhan-vc6lk 3 роки тому

    Sir, please i want more tutorials like this for practice

  • @thedoughnutconnoisseur
    @thedoughnutconnoisseur 3 роки тому

    Amazing Tutorial :), you earned a sub

  • @ANNGUYEN-cw7lw
    @ANNGUYEN-cw7lw 3 роки тому

    Thank you instructor very much. Awesome

  • @Hiyori___
    @Hiyori___ 2 роки тому

    thanks for the fun tutorial

  • @DziqneR
    @DziqneR 2 роки тому +1

    for some reason my turtles are overlapping each other when i run the program

  • @treasuretayo8142
    @treasuretayo8142 3 роки тому

    I love this so much

  • @davidbock6276
    @davidbock6276 3 роки тому

    Can u make a playlist with all beginner projects?

  • @huntermacias2023
    @huntermacias2023 3 роки тому

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

  • @py_tok5589
    @py_tok5589 3 роки тому

    done, good excercise

  • @aunrizvi8063
    @aunrizvi8063 Рік тому

    Can anyone help me to fix the error I am getting , "if 2

  • @rocha1926
    @rocha1926 3 роки тому

    thankss from brazil

  • @parth2teja
    @parth2teja 3 роки тому +4

    beginner full kivy tutorial please 🙃

    • @chikanmao8326
      @chikanmao8326 3 роки тому

      theres already another one

    • @parth2teja
      @parth2teja 3 роки тому +1

      @@chikanmao8326 Thats very old...
      Also I'm asking him to make a complete project like he did with django, flask and pygame

  • @CyberZyro
    @CyberZyro 3 роки тому

    another one , great !

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

  • @videokriitikko5509
    @videokriitikko5509 3 роки тому

    Very good!

  • @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.

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

  • @harshmirdhwal
    @harshmirdhwal 3 роки тому +1

    Please make videos on raspberry pi pico projects with tinyml

  • @AjayYadav-cf9do
    @AjayYadav-cf9do 3 роки тому +1

    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😉

  • @yashchaube2815
    @yashchaube2815 3 роки тому

    Can we simulate this race simulator via multithreading ..... if it makes sense.

  • @cngrsn2879
    @cngrsn2879 3 роки тому

    you arethe best other guys just talk some nonsence

  • @AdityaSen
    @AdityaSen 3 роки тому

    Please make a video on VM, Creating virtual machine using Hypervisior.

  • @polunochNY
    @polunochNY 3 роки тому +1

    How i can change icon of window? help please!

  • @User-ts2jj
    @User-ts2jj 3 роки тому +4

    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

  • @rafastepien4058
    @rafastepien4058 3 роки тому

    Thanks mate

  • @basicallybrand
    @basicallybrand 3 роки тому

    What cursor do you use? I have seen some videos of your and sometimes your cursors turns black?

  • @johnvardy9559
    @johnvardy9559 3 роки тому

    Thanks you hero 🙂

  • @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?

  • @MrMikaXL
    @MrMikaXL 2 роки тому

    can we add that game in a html file with pyscript?

  • @teshou4474
    @teshou4474 3 роки тому

    Waiting for a React series!

  • @andreaspatounis5674
    @andreaspatounis5674 3 роки тому

    51:47 or we can just make it random which turtle starts first

  • @humanshahalovesharks5396
    @humanshahalovesharks5396 3 роки тому

    Uhm, I ran the code on python and nothing happens(I used the download link)

  • @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

  • @CodeWithJoe
    @CodeWithJoe 3 роки тому

    Why do my turtles race twice?

  • @sonalikumari6020
    @sonalikumari6020 3 роки тому +1

    i coudn't get that 'screen' attribute in my turtle module^^, can someone send help
    ?

    • @Cloud-tq5lj
      @Cloud-tq5lj 3 роки тому +1

      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

  • @redheadedmoos1204
    @redheadedmoos1204 3 роки тому

    Hey Tim do u know GD script? If u do can u make a tutorial on it

  • @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.

  • @josemarmelo1942
    @josemarmelo1942 Рік тому

    Can I put names on turtles? :-)

  • @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

  • @cambridgebreaths3581
    @cambridgebreaths3581 3 роки тому

    MATLAB miniseries please.

  • @nadiashams8614
    @nadiashams8614 3 роки тому

    Hey Tim!
    Please make a tutorial on Jarvis by Python....

  • @melissaleigh3013
    @melissaleigh3013 3 роки тому

    Remember the “i like turtles” kid 😂

  • @ibrahimkabeer9513
    @ibrahimkabeer9513 3 роки тому

    Waiting for AI in python

  • @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.

  • @DGHere12
    @DGHere12 3 роки тому

    Hello

  • @dushyantsharma4912
    @dushyantsharma4912 3 роки тому +1

    Hey tim, I am first!

  • @DreaminBig
    @DreaminBig 3 роки тому

    If statement galore