Created
April 6, 2012 07:20
-
-
Save radupotop/2317895 to your computer and use it in GitHub Desktop.
fizzbuzz_
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fizzbuzz(n): | |
if n % 15 == 0: | |
print 'fizzbuzz' | |
elif n % 3 == 0: | |
print 'fizz' | |
elif n % 5 == 0: | |
print 'buzz' | |
else: | |
print n | |
for i in xrange(1,16): | |
fizzbuzz(i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment