Turtle graphics

Discovered the PythonTurtle library, reminded me of LOGO a long time ago (!)

A sample session:

$ bpython
bpython version 0.18 on top of Python 3.7.6 /usr/local/opt/python/bin/python3.7
>>> import turtle
>>> silly = turtle.Turtle()
>>> for i in range(20):
...     silly.forward(i * 10)
...     silly.right(144)
...
>>>
A “spiral star”

(there is a Golang version of this too, to try later)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s