Skip to content
Advertisement

Draw faster circles with Python turtle

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:

from turtle import*
speed(0)
i=0
while i < 360:
    forward(1)
    left(1)
    i+=1

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:

while i < 360:
    forward(3)
    left(3)
    i+=3

That will make your circle less smooth, but three times faster to draw.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement