Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/data/python/recursion
blob: bf8cd5352842907c028f7f461c9d06bd959e16d3 (plain)
1
2
3
4
5
6
7
8
9
10
def count_backwards(number):
    print 'I have the number', number
    if number > 0:
        print 'Calling count_backwards again!'
        count_backwards(number - 1)
    else:
        print 'I am done counting'

number = input('Enter a number: ')
count_backwards(number)