Wondering about learning Python

Duncan Booth me at privacy.net
Thu Jul 22 13:50:10 CEST 2004

Chris <nospam@[]> wrote in news:bKe5VVARw5$AFwRs@[]:

> Anyway, I wonder if anyone would be so kind as to convert it to Python.
> I'm wondering about learning Python - just for fun - and it would be 
> interesting to see how easy it is in comparison with qbasic.

Python version (put it in a file 'spiral.py' then just run it):

from turtle import *

def spiral():
    for i in range(40000):
            t = i/100.
            x = .5 * t * cos(t)
            y = .5 * t * sin(t)
            goto(x, y)

if __name__=='__main__':
    # The code below lets the screen update and then waits until you
    # close the window.
    import turtle

More information about the Python-list mailing list