I have an exercise wherein I have to draw a lot of circles with Python turtle. I have set speed(0)
and I am using:
JavaScript
x
8
1
from turtle import*
2
speed(0)
3
i=0
4
while i < 360:
5
forward(1)
6
left(1)
7
i+=1
8
to draw circles. It takes so long. Is there any faster way?
Advertisement
Answer
You could draw fewer segments, so rather than 360 you go for 120:
JavaScript
1
5
1
while i < 360:
2
forward(3)
3
left(3)
4
i+=3
5
That will make your circle less smooth, but three times faster to draw.