Last active
August 29, 2015 14:18
-
-
Save KoaxialKable/9b2782c91fe9ac585739 to your computer and use it in GitHub Desktop.
First instinct when I heard about the FizzBuzz problem. This took less than two minutes to conceive and code.
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
for i in range(1,101): | |
if i % 3 == 0: | |
if i % 5 == 0: | |
print("FizzBuzz") | |
continue | |
print("Fizz") | |
elif i % 5 == 0: | |
print("Buzz") | |
elif i % 7 == 0: | |
print("Baz") | |
else: | |
print(i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment