diff options
author | Anish Mangal <anish@sugarlabs.org> | 2011-02-22 22:56:40 (GMT) |
---|---|---|
committer | Anish Mangal <anish@sugarlabs.org> | 2011-02-22 22:59:20 (GMT) |
commit | ef3edc36c1a1c06f19823bc7b99a880c48675dfa (patch) | |
tree | e386bac518eaee9b36141aee289a08ce69452e8e /data/python/recursion | |
parent | d29d28ba5390048d5b170cc9ca410bab50012ea8 (diff) |
pep8 and pylint fixes for examples
Diffstat (limited to 'data/python/recursion')
-rw-r--r-- | data/python/recursion | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/data/python/recursion b/data/python/recursion index c34638d..bf8cd53 100644 --- a/data/python/recursion +++ b/data/python/recursion @@ -1,10 +1,10 @@ -def countbackwards(number): - print "I have the number", number +def count_backwards(number): + print 'I have the number', number if number > 0: - print "Calling countbackwards again!" - countbackwards(number-1) + print 'Calling count_backwards again!' + count_backwards(number - 1) else: - print "I am done counting" + print 'I am done counting' -number = input("Enter a number: ") -countbackwards(number) +number = input('Enter a number: ') +count_backwards(number) |