diff options
author | Chris Ball <cjb@pullcord.laptop.org> | 2007-08-28 21:36:32 (GMT) |
---|---|---|
committer | Chris Ball <cjb@pullcord.laptop.org> | 2007-08-28 21:36:32 (GMT) |
commit | a8eedd102ba32233d52fbb45b1f67b255d6e8396 (patch) | |
tree | 2e9709284a14cccafc2812ae7f9d3c72f55629c7 /data/python | |
parent | 4d3670ccd35eabbd3084ed932a3dffb0c23ff064 (diff) |
Examples update.
Diffstat (limited to 'data/python')
-rw-r--r-- | data/python/recursion | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/data/python/recursion b/data/python/recursion new file mode 100644 index 0000000..c34638d --- /dev/null +++ b/data/python/recursion @@ -0,0 +1,10 @@ +def countbackwards(number): + print "I have the number", number + if number > 0: + print "Calling countbackwards again!" + countbackwards(number-1) + else: + print "I am done counting" + +number = input("Enter a number: ") +countbackwards(number) |