Created
February 2, 2015 13:05
-
-
Save utzig/a21c3e9b07a50946fe1a to your computer and use it in GitHub Desktop.
FizzBuzz yay!
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
#!/usr/bin/env python | |
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 n in range(1, 101): | |
fizzbuzz(n) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment