Wondering about learning Python
Patrick Ellis
pellis.no.spam at tampabay.rr.com
Fri Jul 23 00:15:56 EDT 2004
More information about the Python-list mailing list
Fri Jul 23 00:15:56 EDT 2004
- Previous message (by thread): Wondering about learning Python
- Next message (by thread): C++ SWIG Python comments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Duncan Booth wrote: > from turtle import * > > def spiral(): > reset() > degrees() > tracer(0) > for i in range(40000): > t = i/100. > x = .5 * t * cos(t) > y = .5 * t * sin(t) > goto(x, y) > > if __name__=='__main__': > spiral() > # The code below lets the screen update and then waits until you > # close the window. > import turtle > turtle._root.mainloop() Change > for i in range(40000): > t = i/100. into > for t in range(200): and you get something fairly cool looking, assuming spirals are cool.
- Previous message (by thread): Wondering about learning Python
- Next message (by thread): C++ SWIG Python comments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list