Complete Python Turtle Graphics Overview! (From Beginner to Advanced)

  Рет қаралды 731,770

Keith Galli

Keith Galli

6 жыл бұрын

Follow me / keithgalli for more tech content!
In this video I walk through the Turtle Graphics library of Python. This is a perfect video for people just starting out programming to visualize their work. If you have any questions about this video, leave a comment down below!
Feel free to watch on 1.25x or 1.5x speed to learn faster!
Link to Turtle Documentation:
docs.python.org/3.3/library/t...
Source Code for this video!
github.com/KeithGalli/Turtle-...
First video in my Python Programming series:
• Math & Variables in Py...
I will be uploading tutorial videos weekly, so don't forget to SUBSCRIBE to not miss anything :)
-------------------------
Follow me on social media!
Instagram | / keithgalli
Twitter | / keithgalli
-------------------------
If you are curious to learn how I make my tutorials, check out this video: • How to Make a High Qua...
*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.

Пікірлер: 693
@KeithGalli
@KeithGalli 6 жыл бұрын
Video Outline! 0:25 - All Examples seen in this Video 1:40 - Turtle Setup 2:48 - Basic Lines & Turns 5:22 - Creating Simple Shapes (Squares) 8:00 - Common Mistakes 8:30 - Adding color in Turtle 11:46 - Pen up, Pen Down 15:16 - Creating Complex Shapes (Flowers) 22:19 - Using Math Library in Drawings 26:41 - Recursive Stars Example Feel free to watch on 1.25x or 1.5x to learn faster! Thanks for watching :) SUBSCRIBE for future tutorials like this
@yaraabd6955
@yaraabd6955 5 жыл бұрын
Can you give me the name of program?
@KeithGalli
@KeithGalli 5 жыл бұрын
The turtle graphics library of python. The editor I'm using to write the python code is Sublime Text 3. Does this answer your question?
@KeithGalli
@KeithGalli 5 жыл бұрын
This library should come default with python so if you have that, you would have the turtle library. If you want the link to the code i wrote in this video, that's in the Description of the video.
@yaraabd6955
@yaraabd6955 5 жыл бұрын
Sorry if i disturbed you but i don't need this.. you know the programe (Visual stdio , CodeBlocks..) like this .. 🙁
@KeithGalli
@KeithGalli 5 жыл бұрын
www.sublimetext.com/3
@nourgamer1098
@nourgamer1098 3 жыл бұрын
My man stayed up at 3am to educate us. respect, bro.
@waterprincess244minecraft7
@waterprincess244minecraft7 3 жыл бұрын
Right?! his notifixation mad eme laugh
@sumantodi6195
@sumantodi6195 2 жыл бұрын
Timezone
@KaosWater
@KaosWater 4 жыл бұрын
"You made a square, yay!" That also was my reaction as well when I did it. Programming is awesome.
@nrnjn8547
@nrnjn8547 4 жыл бұрын
no
@akulmaurya
@akulmaurya 4 жыл бұрын
*python is awesome
@sunritroykarmakar4406
@sunritroykarmakar4406 3 жыл бұрын
no
@vigneshudhayakumar9999
@vigneshudhayakumar9999 3 жыл бұрын
how to print output in python console/terminal/run/debug, not in seperate window
@playerscience
@playerscience 2 жыл бұрын
Yes! Programming ia awesome 👍😎
@stopmotionmaker9200
@stopmotionmaker9200 4 жыл бұрын
Through this tutorial, I went from knowing nothing to being able to do fun & cool patterns. Great video. Thanks!
@dieunest-fleur5325
@dieunest-fleur5325 4 жыл бұрын
You're doing a amazing job helping beginners like me try my hands at Python and see visual, tangible results. Thanks for that!
@girlintheyellowdresscrafts7197
@girlintheyellowdresscrafts7197 5 жыл бұрын
Thank you for showing us what a newbie would do, then for showing us how it can be done to save time and typing, or in other words, the proper way to do the coding. You are the best teacher!
@halcyondays4922
@halcyondays4922 3 жыл бұрын
THANK you. You are officially saving my coding grades right now man.
@chrissellings4459
@chrissellings4459 6 жыл бұрын
Thanks Keith, this helped me out so much. You have such a good way of explaining things without them being over complicated. In fact I think I might show this to my students when I teach it! :)
@KeithGalli
@KeithGalli 6 жыл бұрын
Glad you enjoyed the video and thank you for the kind words! Comments like this keep me motivated to keep making more videos :)
@jerichofischer7685
@jerichofischer7685 3 жыл бұрын
It's 8:52pm, my intro to programming final is due soon. Thank you for this, you're a life saver
@spiritedaway99
@spiritedaway99 5 жыл бұрын
thank youu ure a good teacher ! loved the way u think nd how u knew the cause of the errors especially in the last graph 😍 ..keep it up ❤
@stevemcgowan3841
@stevemcgowan3841 3 жыл бұрын
Thank you Keith, you are a wonderful instructor! Very clear and precise.
@Me-mn3kg
@Me-mn3kg 4 жыл бұрын
Hey @Keith Galli! I recently found out your channel. I'm new at python and your videos are so helpful. Thanks a lot!
@jamesstahler
@jamesstahler Жыл бұрын
Thanks, man. I think you did a better job of explaining it than my instructor did.
@renomado8616
@renomado8616 5 жыл бұрын
Some script i have made: import turtle n = 10 d = [360/n, n] a = turtle.Turtle() for i in range(d[1]): a.left(d[0]) a.forward(5) turtle.done() It will draw a polygon of "n" sides N = 10 -> decagon
@sophiahuang7388
@sophiahuang7388 3 жыл бұрын
Noice
@nosigame
@nosigame 2 жыл бұрын
import turtle a = 50 turtle.circle(a) turtle.done() work smarter not hard
@creativecarveciteclimb5684
@creativecarveciteclimb5684 2 жыл бұрын
Thanks for the help, I was trying to graph something using turtle and this video helped a lot.
@Leopardhound
@Leopardhound 2 жыл бұрын
thank you, i really like the video and how you explained the concepts. I found it easy to understand and most of all fun. I liked how you told us to give a try at some shapes so that we could try to figure out oursleves how it works! Great video liked and subscribed
@povsurealism1312
@povsurealism1312 5 жыл бұрын
yo thanks mate you just helped me get a few credits for the university may god bless you, and keep up THE GOOD WORK
@zaramomadi5569
@zaramomadi5569 4 жыл бұрын
20:14 I just love how you're making this at 2:30AM
@SahajOberoi
@SahajOberoi 4 жыл бұрын
I make videos at 4-5AM in the morning (before sleeping) Waiting eagerly to get such appreciation for my videos :P
@_9qr
@_9qr 2 жыл бұрын
@@SahajOberoi nah
@colinhammerton6670
@colinhammerton6670 3 жыл бұрын
Excellent stuff! Really easy to understand without all the 'technical' jargon. I now feel like I can do this Pythonning thing, yippeeee!!!!
@DHRUM1L
@DHRUM1L 2 жыл бұрын
Hey Keith it was my first time using python to create something and your tutorial just helped me a lot Thanks for the video Subscribed
@leopillay8939
@leopillay8939 4 жыл бұрын
I'm looking forward to more videos like this ,appreciate this videos
@yasirjune69
@yasirjune69 5 жыл бұрын
THANKS A LOT buddy.. all i needed i found in one video..thanks again
@ProGamer-jy3gb
@ProGamer-jy3gb 5 жыл бұрын
thank you alot , this helped so much... i didnt know anything about this until now
@mozammelhaqmishuk
@mozammelhaqmishuk 6 жыл бұрын
Amazing Python tutorial!
@HorstChristophSchreiber
@HorstChristophSchreiber 3 жыл бұрын
18:30 The turtle language has a repeat command (maybe not in python). If you use the for-loop, you should write "for _ in range(100):", because you don't need the variable (i).
@reidafesta9131
@reidafesta9131 10 ай бұрын
for _ in range(x) uses an already declared variable _ which contains the return of an interactive python session. Using a discard as a variable is not a good approach and can lead to misinformation being outputted in python. Declaring a variable on a for loop is not that big of a deal and will not save you any time nor space. A for loop will always create a variable for an iteration. That is just logic.
@FelixAVargasA
@FelixAVargasA 4 жыл бұрын
At the begining, when I see the tittle of this video I said oh beatiful he will draw a turtle that I looking to draw using Python...but not :). Great video and you are a great teacher man .
@vigneshudhayakumar9999
@vigneshudhayakumar9999 3 жыл бұрын
how to print output in python console/terminal/run/debug, not in separate window
@jimmypalmer1451
@jimmypalmer1451 4 жыл бұрын
Awesome video man! Thanks for the information.
@reubengriffin7738
@reubengriffin7738 5 жыл бұрын
amazing helped me so much as i am a novice at python
@excrementor69
@excrementor69 6 жыл бұрын
hi, i have a question: Is there any way i can work with (for example centimeters) instead of pixels?? Is there any funtion i can use for, for example, drawing a 5x5 cm square istead of a 5x5 px??
@vladimirfol1
@vladimirfol1 3 жыл бұрын
Finally I have a perfect video to send to people who ask me how to start programming. For fun. You should include the section how to install the package lol
@namanvohra8262
@namanvohra8262 5 жыл бұрын
Nice video man! Really Needed this tutorial. Can classes be implemented as well?
@arunkumar-ct1xl
@arunkumar-ct1xl 4 жыл бұрын
this the best python turtle video i ever watched.You are the best!!!! :)
@JohnSmith-kd6ip
@JohnSmith-kd6ip 2 ай бұрын
I didn't know of Turtle until today. This is my first tutorial on this (I am also new to Python, but used other languages before). It looks like a fun module. After a minute or two I tried it myself and created a small loop for a right angle spiral. Easy as pie. Turtle looks like something you can get kids into coding with. length = 10 while length
@Sh1r449
@Sh1r449 5 жыл бұрын
This is awesome and Helped me alot I appreciate it ! Thank you,,,
@manav9518
@manav9518 3 жыл бұрын
This video is too much useful and informative.🔥🔥🔥🔥 2 min silence for those who are searching for turtle module but can't find this video.😅😅
@soybeanz8582
@soybeanz8582 4 жыл бұрын
keith i made all of them and its so cool!!!! thanks keith!
@animeshpandey4138
@animeshpandey4138 4 жыл бұрын
Dope Tutorial !!! .... looking forward to more
@gigachad9336
@gigachad9336 2 жыл бұрын
eyyy thanks man :D i already learn some python so it was easy to do the "for loops " and something
5 жыл бұрын
thanks amigo, this is a wonderful set of examples, hugs
@lakshyamethwani8399
@lakshyamethwani8399 3 жыл бұрын
Thanks! It helped me a lot. Specially for star tutorial :)
@raghuramireddykommerla6387
@raghuramireddykommerla6387 2 жыл бұрын
Perfect prog for diagram showed in video. Thanks for the turtorial. import turtle d=turtle.Turtle() d.speed(20) d.color("red", "yellow") d.begin_fill() for i in range(36): d.forward(300) d.left(170) d.end_fill()
@indexcards9414
@indexcards9414 Жыл бұрын
This video helped out with my homework! Thanks!
@Pythagoras31415
@Pythagoras31415 Жыл бұрын
The video is exactly what I am looking for. I am new to Python. I studied math in college and graduated back in 2005. I didn't use math professionally. I was reluctant to learning Python. I took C Programming and this language seems more suited for me.
@vixlu1912
@vixlu1912 6 жыл бұрын
Thanks Keith, Literally have an exam on python tomorrow this helped me a lot
@KeithGalli
@KeithGalli 6 жыл бұрын
Glad to hear it! Hope you did well on your exam :)
@vixlu1912
@vixlu1912 6 жыл бұрын
Yeah I passed with a breeze cheers man :)
@mayankmaurya1559
@mayankmaurya1559 2 жыл бұрын
Nice explanation This makes a python more creative and intresting
@awesomewinter3103
@awesomewinter3103 5 жыл бұрын
Very cool tutorial, thank you!
@johankaruyan5536
@johankaruyan5536 4 жыл бұрын
where can i find the documentations for the keyboard shortcuts that u are doing when u highlight all those different lines and comment them or tab them or de-tab them ?
@bethanderson5050
@bethanderson5050 5 жыл бұрын
Nicely done and very helpful.
@acemusiq900
@acemusiq900 4 жыл бұрын
Bro great tutorial I am new to python but after learning the turtle I have a way better understanding of python thanks!!!!!!
@KeithGalli
@KeithGalli 4 жыл бұрын
Love to hear that!! You're very welcome :)
@vigneshudhayakumar9999
@vigneshudhayakumar9999 3 жыл бұрын
how to print output in python console/terminal/run/debug, not in separate window
@vigneshudhayakumar9999
@vigneshudhayakumar9999 3 жыл бұрын
@@KeithGalli how to print output in python console/terminal/run/debug, not in separate window
@johankaruyan5536
@johankaruyan5536 4 жыл бұрын
Thanks Bob Your Such A Great Teacher!
@kylieying2
@kylieying2 6 жыл бұрын
Amazing Python tutorial! My code works!
@lisitashamatutu1140
@lisitashamatutu1140 2 жыл бұрын
Great Stuff Keith
@grimindyt
@grimindyt 3 жыл бұрын
Keith brother love from India . You are giving a lot of value in this video . But bro i want to request you to just increase volume because its little bit difficult to hear you . Have a great day man .
@AnDrEwGoMeZ12
@AnDrEwGoMeZ12 4 жыл бұрын
ive been messing around with turtle all day and I like the symmetry you're able to do by applying math functions.. what would the script have looked like for the two examples you showed in the beginning at 1:08 and :56
@risingbeast6352
@risingbeast6352 3 жыл бұрын
Hi, I had a question, I don't know if you're still responding, but there's a slight chance you do. So whenever I run there codes, it does whatever I tell it to, but then the drawing just disappears instantly. Is there anything you could do to help? Thank You.
@ashishjoshi911
@ashishjoshi911 Жыл бұрын
the last one took me whole day to figure out what tf was going inside in the function daymmnnn it is really a advance code!
@shamanthrajreddy1230
@shamanthrajreddy1230 Жыл бұрын
Great tutorial, Thanks!
@oaywang3053
@oaywang3053 4 жыл бұрын
Nice! to draw that flower, I just typed forward(100) right(160) ahead (100)... a hundred times before remembering to use copy and paste!!! NICE VIDEO!
@chubz1568
@chubz1568 2 жыл бұрын
hey Keith G I saw the mit poster in the background and was wondering what standards I need to set to get in from the UK so that I can begin working on this goal from a relatively young age.
@ashishjoshi911
@ashishjoshi911 Жыл бұрын
bro is a straightforward best tuitor
@brettknoss486
@brettknoss486 4 жыл бұрын
Cyan Magenta and Yellow are primary colours using additive theory, Blue, Red and Green for subtractive. So cyan and magenta are to be expected.
@andrewwallo
@andrewwallo 2 жыл бұрын
for anyone wondering for the flower, use this: for i in range(36): bob.forward(300) bob.left(170)
@Bobitsaneva
@Bobitsaneva 9 ай бұрын
I finally got it and thank you so muck
@aretretabassum8608
@aretretabassum8608 4 жыл бұрын
how do i run something? like when i followed your code at 17:27 what button did you press to run it and have it show the animation. please help I'm sorry I'm new
@nurunnahar4243
@nurunnahar4243 4 жыл бұрын
Look at the back of him "MIT"
@katemiddleton9543
@katemiddleton9543 4 жыл бұрын
Muzaffarpur Institute of Technology
@RiKM0078
@RiKM0078 5 ай бұрын
thanks for the tutorial man you are best 🤞🤞🤞🤞
@niraleemalot8032
@niraleemalot8032 2 жыл бұрын
Thank for the tutorial!
@StormHalei
@StormHalei 5 жыл бұрын
Nice work bro 👍🏼
@TheHaLeM2
@TheHaLeM2 2 жыл бұрын
Great video, many thx!
@hyperd719
@hyperd719 4 жыл бұрын
Your video has helped me a lot.
@marthamurugi8221
@marthamurugi8221 4 жыл бұрын
Hi Keith, thanks for the tutorial. I'm using sublime and the turtle library ain't working. Any tutorial on how to fix it?
@ghesboro_
@ghesboro_ 5 жыл бұрын
Great video but how can i edit a python drawing after I saved it? Because when i open it i only can see the arrows that works. (oh, and can i stop the drawing while the arrows is moving?)
@JordanMetroidManiac
@JordanMetroidManiac 5 жыл бұрын
Open the snipping tool (on Windows, otherwise I don't know what you'd use). Then, to pause the turtle's drawing, click on "New" and select the area on the screen that contains the drawing. You can save this picture and then edit the picture in some image editing software.
@ert2378
@ert2378 2 жыл бұрын
If I want to draw successive circles and every six circles are the same color, and I have a list of colors with six colors, how can I do this within only one loop, please help me
@stepsvideos
@stepsvideos 3 жыл бұрын
My turtle code keeps crashing, unless I type in 'turtle.reset()' in the console window between runs. The window appears, no drawing, and it will not allow you to close it. I'm using Python 3.8, in Spyder editor.
@jellyteeth656
@jellyteeth656 4 жыл бұрын
Bro you just saved me, I want to thank you personally
@ismaaciilgaraad6650
@ismaaciilgaraad6650 3 жыл бұрын
T
@IbrahimIbrahim-st3qw
@IbrahimIbrahim-st3qw 2 жыл бұрын
great work ... keep it up
@jetsonherrera7538
@jetsonherrera7538 4 жыл бұрын
So cool! Thanks so much !
@eshetatayal6788
@eshetatayal6788 3 жыл бұрын
thanks for giving something to start
@annizhou6610
@annizhou6610 Жыл бұрын
When I type command B on my mac book laptop. the graphic won't pop out.
@michalvrbovsky121
@michalvrbovsky121 3 жыл бұрын
Hi. When I try to run the code with turtle graphics, it opens the new windowd and instantly closes. What should I do ?
@jacktech4055
@jacktech4055 5 жыл бұрын
Your Videos Are So Helpful Sir
@ryanvela608
@ryanvela608 2 жыл бұрын
Whenever a tried writing “bob.left(45)” my arrow did not move like it did in the video. Can someone please help explain why.
@MACCBI123
@MACCBI123 4 жыл бұрын
Hi, I build the 4 in a row game. how can I use this library to visualize my game?
@Kimmie_78
@Kimmie_78 3 жыл бұрын
thank you so much, this was helpful
@the9263
@the9263 Жыл бұрын
Thanks a lot for the video. Amazing Job.
@shaik.khajanizamuddin584
@shaik.khajanizamuddin584 4 жыл бұрын
I am not getting python turtle graphic window . I am using sublime text 3 and also installed python 3.8. i am able to run normal programs but not able to use turtle graphic . Please help me .
@manuelmachado1633
@manuelmachado1633 3 жыл бұрын
Hi! one question if u read this, how can i save the turtle grafic? like after i run it how con i automatically save it as jpg or png? Thanks!!
@citizen4602
@citizen4602 2 жыл бұрын
Thanks this video was very helpful.
@aronismemorybits
@aronismemorybits 3 ай бұрын
thanks a lot bro so good please make more
@juanmontoya569
@juanmontoya569 5 жыл бұрын
How can I get the window to pop up like where the turtle is and all of that stuff ?
@CombatChief0126
@CombatChief0126 2 жыл бұрын
Can i just use python to run the turtle graphics? When i go to the link in the comments for turtle graphics it is just a bunch of text.
@savitavyas1981
@savitavyas1981 3 жыл бұрын
I made a graph generator using turtle module. Thanks for the tutorial
@3BoxCreation
@3BoxCreation 4 жыл бұрын
i have another question . how to draw a circle around the mouse pointer. and how to add a animation to every clicks.?
@dailymotiv8411
@dailymotiv8411 Жыл бұрын
love you bro thanks for the video
@Evangelistabryanantigua
@Evangelistabryanantigua 4 жыл бұрын
Hey I have a question. Why why the screen pops up is say not responding?
@roryengland1996
@roryengland1996 3 жыл бұрын
learned loads, thank you very much
@mr.nobody3758
@mr.nobody3758 2 жыл бұрын
yes
@shwethamachani2093
@shwethamachani2093 5 жыл бұрын
Hey dude, It's very interesting topic..You explained it so neat.😊
@Zackemcee1
@Zackemcee1 4 жыл бұрын
30:36 I found that you take 216 - 180 which equals to 36 and you take that and subtract it from 180 thus you have a 144 which is a perfect angle in order to maintain the direction and not go the other way around
@user-wy3ud9ff8s
@user-wy3ud9ff8s 6 жыл бұрын
Nice Video But video audio is little bit low thanks for the video :) if you have free time please make a tutorial about this pycairo drawing module :)
@gameorgame8362
@gameorgame8362 5 жыл бұрын
I love this video and on my language jag älskar den här videon
How programmers flex on each other
6:20
Fireship
Рет қаралды 2,3 МЛН
My Brain after 569 Leetcode Problems
7:50
NeetCode
Рет қаралды 2,5 МЛН
Опасность фирменной зарядки Apple
00:57
SuperCrastan
Рет қаралды 12 МЛН
2 YEARS of PYTHON Game Development in 5 Minutes!
4:54
Coding With Russ
Рет қаралды 886 М.
Why Do Bubbles Form In Glasses Of Water?
12:33
Joe Scott
Рет қаралды 85 М.
The moment we stopped understanding AI [AlexNet]
17:38
Welch Labs
Рет қаралды 853 М.
Coding Adventure: Simulating Fluids
47:52
Sebastian Lague
Рет қаралды 1,7 МЛН
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 392 М.
Solving Wordle using information theory
30:38
3Blue1Brown
Рет қаралды 10 МЛН
How I'd Learn AI (If I Had to Start Over)
15:04
Thu Vu data analytics
Рет қаралды 766 М.
How to Program a Game! (in Python)
1:10:07
Keith Galli
Рет қаралды 493 М.
How I would learn to code (If I could start over)
9:16
Jason Goodison
Рет қаралды 4,7 МЛН