Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 435
user1794625 Avatar asked Feb 13 '26 06:02

user1794625


1 Answers

Have you tried turtle.delay() or turtle.tracer() ? See documentation here and here. These set options for screen refreshing which is responsible for most of the delays.

like image 131
hola Avatar answered Feb 15 '26 20:02

hola



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!