Python Countdown
john boy
xray_alpha_charlie at yahoo.com
Fri Nov 11 14:22:08 EST 2005
I am running the following program from the example in "how to think like a computer scientist"
def countdown(n):
if n ==0:
print "Blastoff!"
else:
print n
countdown (n-1)
countdown (1000)
When I set "n"= 1000 the program runs in interpreter and stops counting down at 14 instead of running all the way to "Blastoff". If I set n = 985 it completes the program. If I set n=1200 it runs to 214 and stops. Why is this program only counting to 986....Anybody have an answer??
I am using Python 2.4.2
---------------------------------
Yahoo! FareChase - Search multiple travel sites in one click.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20051111/0124b47a/attachment.html>
More information about the Python-list
mailing list