Wondering about learning Python

Chris nospam at [127.0.0.1]
Thu Jul 22 12:50:57 CEST 2004


I've written a small QBASIC program which draws a spiral. Here is the 
code:

SCREEN 12
CLS
FOR t = 1 TO 400 STEP .01
x = .5 * t * COS(t)
y = .5 * t * SIN(t)
PSET (x + 320, y + 240)
NEXT t

I noticed that it generated some interesting patterns, probably as a 
result of rounding errors.  These can be explored further by making the 
spiral tighter.

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.
-- 
Chris



More information about the Python-list mailing list