4 Comments
User's avatar
Lawi Bundi's avatar

Thanks for this it helps me figure out how to code two points touching. Something I was working on in 🐢.

Expand full comment
Stephen Gruppetta's avatar

The `.distance()` method helps for this. The default diameter / extent (call it whatever you want) is 20 pixels, so you'll see this "magic number" often in many of my `turtle` programs (not so much this one, where shapes are more complex). And if you use `.turtlesize()`, which is a multiplicative factor, then 20 * whatever_you_used_in_turtlesize is useful!

Expand full comment
Wyrd Smythe's avatar

Heh, cute! Nice demonstration of some of the richer features of the Python turtle.

Expand full comment
Stephen Gruppetta's avatar

It’s fun to play, too

Expand full comment