Ask coding questions

← Back to all posts
Processing limit to using Python with Turtle?

Is there a processing limit to using Python with Turtle?

All I'm doing is drawing shapes and rotating, and drawing again to make patterns. see

pat(32) works, but anything above 32 causes the code to hang part way through the loop with the turtle spinning on the spot.

I have the same issue with a number of python turtle scripts. They all work up to a limit, then hang with the spinning turtle.

Note: the code works find in Python 3.6.6 on my pc.

Any ideas?



Screenshots of it hanging...


@snowdena try pat(36)


I use Chrome on a Windows 10 laptop.
Just tested in different browsers, it works in both Edge and Internet Explorer.

Tried a Windows 7 desktop - works in IE but not Chrome
Tried a Windows 10 desktop - works in Edge and IE but not Chrome

Appears to be a problem with Chrome.

Thanks for the help.


Your code already had it set up for pat(33)
When I ran it, the program completed just fine


I did something similar but a lot more random, so I just thought it was some glitch that happens if some specific angles and lines get picked, but it might be the same problem you're having.
If you run that code a lot, eventually you'll get something that works, but most of the time it just breaks, I haven't tried running it on a local Python IDLE but I'll put the results here when I do.