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
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.
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
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).
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.
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!
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! :)
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 .
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
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()
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.
This one is pretty good for the flower too!! from turtle import * color('blue', 'cyan') speed(10) begin_fill() while True: forward(200) left(170) if abs(pos()) < 1: break end_fill() done()
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
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 .
Thanks for the tutorial! Who needs uni when you have the internet? Even made a moving clock with Turtle: import turtle kaese = turtle.Turtle() kaese.speed(10) h = 0 running = True # draws the circle of the clock kaese.color("black") kaese.setheading(180) kaese.penup() kaese.forward(210) kaese.right(90) kaese.pendown() for i in range(90): kaese.forward(15) kaese.right(4) # jumps back to the center kaese.penup() kaese.setheading(0) kaese.forward(210) kaese.pendown() # draws the rotating arm while running: kaese.color("black") kaese.setheading(h) kaese.forward(200) kaese.color("white") kaese.left(180) kaese.forward(200) h -= 3.1 turtle.done()
That's a good one. If you want to make it even cooler: - align main clock circle with rotating arm: they are offcenter; - use write function to place numbers; - make an animation of an actually rotating arm;
hey i just wanted to say thank you i watched this last year to make games and now i have a career i make games using python c# and other things like that i really wanna thank you for all that you have done
Alright guys, I made this script to help yall make squares: def square(turt, length, doFill = False): if doFill: turt.begin_fill() for i in range(4): turt.forward(length) turt.left(90) turt.end_fill() else: for i in range(4): turt.forward(length) turt.left(90) All you have to do is do square({turtle}, {length}, {fill: True/False}) For example I could do this and it makes a square with a length of 100 that fills: bob = turtle.Turtle () square(bob, 100, True) Setting the fill to "True" fills and settings it to "False" doesn't fill (CASE SENSITIVE!). Also, not setting the fill just turns it off by default.
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
Nice widening spirals, becoming a space stars image. Just a kind notice to others: if you don't know how to use turtle.Screen().update() and speed(0) - don't even think to launch anything with 2M iterations.
Here, a fun gift: -=-=-=-=-=-=-=-=-=-=- import turtle as tu a = tu.Turtle() a.penup() a.goto(0, -150) a.pendown() a.left(90) a.speed(0) def drawn(l): if l < 5: return else: a.forward(l) a.left(30) drawn(4*l/5) a.right(60) drawn(4*l/5) a.left(30) a.backward(l) drawn(100) -=-=-=-=--=-=-=-=-=-=-=- change the ''5'' in ''if l < 5'' to change how detailed you want it (the higher, the less details, the faster it is rendered) and the ''100'' in the last line to control how many times it is going to be repeated. Pretty neat. Hope you enjoy it
for the screen part, you have to make a screen like you made pegasus. This is done by doing screen = turtle.Screen() then you do screen.bgcolor("red") Hope this helped to anyone in need :) (At least that's how I do it.)
i made this yesterday, thought i would share import turtle as t t.speed(0) t.pensize(1) x = 200 # size of circle y = 25 # agle of separation z = 36 # number of loops completed for i in range(z): t.right(y) t.color("red") t.circle(x) t.rt(y) t.color("blue") t.circle(x)
if you change the range to 120 then the fill will go properly... you can also use turtle.pencolor('red') then turtle.fillcolor('yellow') if keith's commands do not work for color.
my_turtle.color("red", "yellow") my_turtle.speed(10) my_turtle.begin_fill() for i in range(100): my_turtle.forward(i**2) my_turtle.left(170) my_turtle.end_fill() you should try this
For the people that don't remember the beginning and end: import turtle my_turtle = turtle.Turtle() my_turtle.color("red", "yellow") my_turtle.speed(10) my_turtle.begin_fill() for i in range(100): my_turtle.forward(i**2) my_turtle.left(170) my_turtle.end_fill() turtle.done()
That's a nice spiral star! Though I replaced i**2 with i**2/10 for it to fit into my screen. Also, people are right about speed. Though in order to have an instant image one does just use screen update lock and update on demand.
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.
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
@@abigailc6271 i am not sure exactly what the question is but if u want to know how to get the screen where you can see the program itself drawing, u just run the program, i am not sure which ide or text editor ur using but just google "how to run a python program in (ide / text editor name) and just running it should bring up the screen
Hey Keith, love your videos, I have watched your tkinter video, and it was excellent. I want to ask you a question about programming. About 100 years ago when I was a teenager, I learned a language called BASIC. I got pretty good at it. After that , life happened and almost 40 years passed. Now I am a disabled and at home. To keep me from getting too bored I decided to learn and realized that I wanted to build an app. I know pythons scalability make it perfect for what I want to do. My question is, where should I start to get my brain out of the command line programming.? I have watched a few object oriented tutorials but I am struggling with the main loop idea and assigning functions and syntax. Thank you for your time.
Guys, you need to check this out. This script wanders across the whole screen and covers it with random doodles just like a child would. I found these angles just by experimenting. import turtle import math bob = turtle.Turtle() while(1): bob.speed(15) bob.forward(20) print(10*math.sin(1/bob.pos()[0]+bob.pos()[1])) bob.left(angle) bob.forward(20) bob.right(23) turtle.done()
you know when getting it right to draw a simple shape for the first time it feels awesome and then you get professional at it and when someone else gets it right the first time your whats the big deal you drew a sqaure😅
Instead of doing bob = turtle.Turtle() while you import you can do import turtle as bob and then you can do bob.forward(10) or something like that this helps me simplify my code
A variation on your code that plays around with the coloring: import turtle turtle.colormode(255) turtle.speed(0) for i in range (2000): turtle.pencolor((i%180+50,0,0)) turtle.left(i%180) turtle.forward(i%180)
Heighway Dragon Curve (I got the bitwise math from Wikipedia on this fractal): for i in range (6000): my_turtle.forward (1) my_turtle.left (90 if ((i&-i)
i got that error:- Traceback (most recent call last): File "C:\Users\Som3a\Desktop\jh.py", line 1, in import turtle File "C:\Users\Som3a\Desktop\turtle.py", line 1, in som3a=turtle.Turtle() NameError: name 'turtle' is not defined
You need to make sure to didn't save the file as turtle.py. You've called a script turtle.py, which is shadowing the turtle module in the standard library. Rename it.
Im very happy with this: import math import turtle t = turtle.Pen() t.speed(12) t.color("blue") for x in range(4000): t.forward(30) t.left(math.sin(x/13)*25) t.forward(math.sqrt(188)) t.left(33) turtle.done()
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
Can you give me the name of program?
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?
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.
Sorry if i disturbed you but i don't need this..
you know the programe (Visual stdio , CodeBlocks..) like this .. 🙁
www.sublimetext.com/3
"You made a square, yay!" That also was my reaction as well when I did it. Programming is awesome.
no
*python is awesome
no
Yes! Programming ia awesome 👍😎
That simple before mastering python i used to know na logo so it's very easy this just for recall
My man stayed up at 3am to educate us.
respect, bro.
Right?! his notifixation mad eme laugh
Timezone
You're doing a amazing job helping beginners like me try my hands at Python and see visual, tangible results. Thanks for that!
Through this tutorial, I went from knowing nothing to being able to do fun & cool patterns. Great video. Thanks!
THANK you. You are officially saving my coding grades right now man.
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
Noice
import turtle
a = 50
turtle.circle(a)
turtle.done()
work smarter not hard
20:14 I just love how you're making this at 2:30AM
I make videos at 4-5AM in the morning (before sleeping) Waiting eagerly to get such appreciation for my videos :P
@@SahajOberoi nah
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).
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.
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!
Thanks, man. I think you did a better job of explaining it than my instructor did.
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! :)
Glad you enjoyed the video and thank you for the kind words! Comments like this keep me motivated to keep making more videos :)
It's 8:52pm, my intro to programming final is due soon. Thank you for this, you're a life saver
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 .
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.😅😅
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
Bro great tutorial I am new to python but after learning the turtle I have a way better understanding of python thanks!!!!!!
Love to hear that!! You're very welcome :)
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()
bro is a straightforward best tuitor
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.
for anyone wondering for the flower, use this:
for i in range(36):
bob.forward(300)
bob.left(170)
This one is pretty good for the flower too!!
from turtle import *
color('blue', 'cyan')
speed(10)
begin_fill()
while True:
forward(200)
left(170)
if abs(pos()) < 1:
break
end_fill()
done()
hey how did you fill the colour so nicely
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
yo thanks mate
you just helped me get a few credits for the university
may god bless you, and keep up THE GOOD WORK
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 ❤
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!
Thanks for the help, I was trying to graph something using turtle and this video helped a lot.
Thanks Keith, Literally have an exam on python tomorrow this helped me a lot
Glad to hear it! Hope you did well on your exam :)
Yeah I passed with a breeze cheers man :)
Thank you Keith, you are a wonderful instructor! Very clear and precise.
Excellent stuff! Really easy to understand without all the 'technical' jargon. I now feel like I can do this Pythonning thing, yippeeee!!!!
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 .
Hey @Keith Galli! I recently found out your channel. I'm new at python and your videos are so helpful. Thanks a lot!
Thanks for the tutorial! Who needs uni when you have the internet?
Even made a moving clock with Turtle:
import turtle
kaese = turtle.Turtle()
kaese.speed(10)
h = 0
running = True
# draws the circle
of the clock
kaese.color("black")
kaese.setheading(180)
kaese.penup()
kaese.forward(210)
kaese.right(90)
kaese.pendown()
for i in range(90):
kaese.forward(15)
kaese.right(4)
# jumps back
to the center
kaese.penup()
kaese.setheading(0)
kaese.forward(210)
kaese.pendown()
# draws the rotating arm
while running:
kaese.color("black")
kaese.setheading(h)
kaese.forward(200)
kaese.color("white")
kaese.left(180)
kaese.forward(200)
h -= 3.1
turtle.done()
Wow that's actually impressing!
Speed 0 is faster than 10
That's a good one. If you want to make it even cooler:
- align main clock circle with rotating arm: they are offcenter;
- use write function to place numbers;
- make an animation of an actually rotating arm;
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!
Cyan Magenta and Yellow are primary colours using additive theory, Blue, Red and Green for subtractive. So cyan and magenta are to be expected.
I'm looking forward to more videos like this ,appreciate this videos
Amazing Python tutorial!
THANKS A LOT buddy.. all i needed i found in one video..thanks again
hey i just wanted to say thank you i watched this last year to make games and now i have a career i make games using python c# and other things like that i really wanna thank you for all that you have done
Bro you just saved me, I want to thank you personally
T
Alright guys, I made this script to help yall make squares:
def square(turt, length, doFill = False):
if doFill:
turt.begin_fill()
for i in range(4):
turt.forward(length)
turt.left(90)
turt.end_fill()
else:
for i in range(4):
turt.forward(length)
turt.left(90)
All you have to do is do square({turtle}, {length}, {fill: True/False})
For example I could do this and it makes a square with a length of 100 that fills:
bob = turtle.Turtle ()
square(bob, 100, True)
Setting the fill to "True" fills and settings it to "False" doesn't fill (CASE SENSITIVE!). Also, not setting the fill just turns it off by default.
And remember to put the def before you call the square or it won't work
@@stae24 ?
The turtle grid system is x = -675 ---> 675, y = -345 ---> 345
i made a hexigon
Very nice (borat voice)
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
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
This guy is more comedic that he is informative.
MSW Logo in Python
Nice explanation
This makes a python more creative and intresting
for i in range(2000000):
x.forward(math.sqrt(i)/5)
x.left(i%185.273567834657834658734876578)
@Ismail Amiri you didn't see this formula finished did ya?
Nice widening spirals, becoming a space stars image. Just a kind notice to others: if you don't know how to use turtle.Screen().update() and speed(0) - don't even think to launch anything with 2M iterations.
@Ismail Amiri yikes, wikipedia tells there's quite a story behind "watermelon stereotype". I don't get your joke anyway.
Thank you! I have homework about drawing a triangle in Python, and the book is not helpful at all. Your video is very helpful and easy to understand
Here, a fun gift:
-=-=-=-=-=-=-=-=-=-=-
import turtle as tu
a = tu.Turtle()
a.penup()
a.goto(0, -150)
a.pendown()
a.left(90)
a.speed(0)
def drawn(l):
if l < 5:
return
else:
a.forward(l)
a.left(30)
drawn(4*l/5)
a.right(60)
drawn(4*l/5)
a.left(30)
a.backward(l)
drawn(100)
-=-=-=-=--=-=-=-=-=-=-=-
change the ''5'' in ''if l < 5'' to change how detailed you want it (the higher, the less details, the faster it is rendered) and the ''100'' in the last line to control how many times it is going to be repeated. Pretty neat.
Hope you enjoy it
@@Harmonity awww wowww It's a flower!!! :P
/Dandilion Clock!!!
I made a graph generator using turtle module. Thanks for the tutorial
This video helped out with my homework! Thanks!
for the screen part, you have to make a screen like you made pegasus. This is done by doing screen = turtle.Screen()
then you do screen.bgcolor("red")
Hope this helped to anyone in need :)
(At least that's how I do it.)
i made this yesterday, thought i would share
import turtle as t
t.speed(0)
t.pensize(1)
x = 200 # size of circle
y = 25 # agle of separation
z = 36 # number of loops completed
for i in range(z):
t.right(y)
t.color("red")
t.circle(x)
t.rt(y)
t.color("blue")
t.circle(x)
I got this from my computer teacher to watch the first 15 minutes of this video.
im guessing you go to stratford
Shs?
Nykolous soar high school?
18:00 just use
for i in range(10):
keith.forward(100)
keith.left(135)
keith.forward(100)
thank you alot , this helped so much... i didnt know anything about this until now
eyyy thanks man :D i already learn some python so it was easy to do the "for loops " and something
Look at the back of him "MIT"
Muzaffarpur Institute of Technology
amazing helped me so much as i am a novice at python
Try this one:
import turtle
window = turtle.Screen()
drawer = turtle.Turtle()
window.title("Drawing")
window.bgcolor("white")
counter = 110
while True:
drawer.forward(counter)
drawer.left(150)
drawer.forward(counter)
drawer.left(165)
counter = counter + (counter/(counter/3))
turtle.done()
for the screen you can do wn = turtle.Screen() then you can do wn.bgcolor("red")
Thanks! My teacher thinks Im a pro now
you could do this
line = 0
bob.color("red","orange")
bob.begin_fill()
while line < 20:
bob.left
(170)
bob.forward(200)
line += 1
bob.end_fill()
if you change the range to 120 then the fill will go properly... you can also use turtle.pencolor('red') then turtle.fillcolor('yellow')
if keith's commands do not work for color.
23:35, he created Corona virus 2 years back!
Still amazes me!!!
keith i made all of them and its so cool!!!! thanks keith!
my_turtle.color("red", "yellow")
my_turtle.speed(10)
my_turtle.begin_fill()
for i in range(100):
my_turtle.forward(i**2)
my_turtle.left(170)
my_turtle.end_fill()
you should try this
For the people that don't remember the beginning and end:
import turtle
my_turtle = turtle.Turtle()
my_turtle.color("red", "yellow")
my_turtle.speed(10)
my_turtle.begin_fill()
for i in range(100):
my_turtle.forward(i**2)
my_turtle.left(170)
my_turtle.end_fill()
turtle.done()
u can use "fd" instead of forward, and speed 0 is faster than 10.
@@hunyuan8045 you can use speed 100 as well
That's a nice spiral star! Though I replaced i**2 with i**2/10 for it to fit into my screen. Also, people are right about speed. Though in order to have an instant image one does just use screen update lock and update on demand.
@@nykolous9830 yes i did that to u just roasted that other guy
and thats not all u have to do my_turtle = turtle.Pen()
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.
this the best python turtle video i ever watched.You are the best!!!! :)
for i in range(8):
for i in range(8):
bob.forward(90)
bob.left(45)
bob.penup()
bob.left(135)
bob.forward(90)
bob.pendown()
Earned yourself another subsciber and like :) Keep up the great work!
Thank you!! :)
@@KeithGalli I was wondering, is it possible to make a 2 player chess game using turtle? I have a project on it and would love to know asap.
I would recommend using pygame instead. I have videos on connect 4 in pygame that would probably be helpful to watch
@@KeithGalli Thanks alot! Il do that
Which idle u are using
Awesome video man! Thanks for the information.
you can fill the star by just make for I in range(9): just
Instead of writing...
import turtle
keith = turtle.Turtle()
... you can write
import turtle as keith
I think it’s going to work ;)
Pie XIII No it must be
import turtle
import turtle.Turtle() as keith
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
Great video. The question is: How to have the second screen displaying the visual outcome of the code? (the Python Turtle Graphic)
same here. i wish to know too!
@@abigailc6271 i am not sure exactly what the question is but if u want to know how to get the screen where you can see the program itself drawing, u just run the program, i am not sure which ide or text editor ur using but just google "how to run a python program in (ide / text editor name) and just running it should bring up the screen
20:11 "you're waking up in 5 hours."
Lol yeah I made this video pretty late at night xD
flux
Not even the right timestamp you coronafuk!
so sry 4 the harsh words!! oops
Hey dude,
It's very interesting topic..You explained it so neat.😊
Thanks Bob Your Such A Great Teacher!
Hey Keith, love your videos, I have watched your tkinter video, and it was excellent. I want to ask you a question about programming. About 100 years ago when I was a teenager, I learned a language called BASIC. I got pretty good at it. After that , life happened and almost 40 years passed. Now I am a disabled and at home. To keep me from getting too bored I decided to learn and realized that I wanted to build an app. I know pythons scalability make it perfect for what I want to do. My question is, where should I start to get my brain out of the command line programming.? I have watched a few object oriented tutorials but I am struggling with the main loop idea and assigning functions and syntax. Thank you for your time.
100 years?
Guys, you need to check this out. This script wanders across the whole screen and covers it with random doodles just like a child would.
I found these angles just by experimenting.
import turtle
import math
bob = turtle.Turtle()
while(1):
bob.speed(15)
bob.forward(20)
print(10*math.sin(1/bob.pos()[0]+bob.pos()[1]))
bob.left(angle)
bob.forward(20)
bob.right(23)
turtle.done()
thanks for giving something to start
you know when getting it right to draw a simple shape for the first time it feels awesome and then you get professional at it and when someone else gets it right the first time your whats the big deal you drew a sqaure😅
Thanks! It helped me a lot. Specially for star tutorial :)
Instead of doing bob = turtle.Turtle() while you import you can do import turtle as bob and then you can do bob.forward(10) or something like that this helps me simplify my code
Nice video man! Really Needed this tutorial. Can classes be implemented as well?
For i in range (2000)
turtle.left(i%180)
turtle.forward(i%180)
A variation on your code that plays around with the coloring:
import turtle
turtle.colormode(255)
turtle.speed(0)
for i in range (2000):
turtle.pencolor((i%180+50,0,0))
turtle.left(i%180)
turtle.forward(i%180)
That's quite cool. Like a virus through a microscope.
learned loads, thank you very much
yes
thanks for the tutorial man you are best 🤞🤞🤞🤞
Heighway Dragon Curve (I got the bitwise math from Wikipedia on this fractal):
for i in range (6000):
my_turtle.forward (1)
my_turtle.left (90 if ((i&-i)
That's quite cool, but it leaves the screen and never comes back
@@darek4488 what
swear i saw bro getting hypnotized by the rythmic smooth movements of the lines going up down left up down left....up.....downn.......leeeffftt mmmmm.
Great tutorial, Thanks!
today I learned, thank you.
Amazing Python tutorial! My code works!
i got that error:- Traceback (most recent call last):
File "C:\Users\Som3a\Desktop\jh.py", line 1, in
import turtle
File "C:\Users\Som3a\Desktop\turtle.py", line 1, in
som3a=turtle.Turtle()
NameError: name 'turtle' is not defined
Just import turtle
You need to make sure to didn't save the file as turtle.py. You've called a script turtle.py, which is shadowing the turtle module in the standard library. Rename it.
@@ramiralcantara1731 How do i rename it though??
@@ramiralcantara1731 I almost gave up on this, thanks for your insight
Thanks this video was very helpful.
Im very happy with this:
import math
import turtle
t = turtle.Pen()
t.speed(12)
t.color("blue")
for x in range(4000):
t.forward(30)
t.left(math.sin(x/13)*25)
t.forward(math.sqrt(188))
t.left(33)
turtle.done()
I did this for a uni assignment and called the turtle "Lord Tywin", I lost marks
The real question is do you regret doing it? If not then it was worth it
@@captainjacksparrow3221 it was very worth it 😂