[Tutor] What's the problem with my SpinSpeeds.py?

Dragonfirebane at aol.com Dragonfirebane at aol.com
Sun Aug 1 19:09:05 CEST 2004


In addition to using string formatting so that it counts to 'n' <t = 
Timer("countUsingRange(%s)" % n, "from __main__ import countUsingRange")> and <t = 
Timer("countUsingXrange(%s)" % n, "from __main__ import countUsingXrange")> , you 
could also do:

repetitions = int(raw_input("How many times should I count? "))
n = int(raw_input("How high should I count? "))

so that the user can see for themselves the time difference.

Email: dragonfirebane at aol.com
AIM: singingxduck
Programming Python for the fun of it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20040801/e98137f5/attachment-0001.html


More information about the Tutor mailing list