Skip to content

Instantly share code, notes, and snippets.

@KoaxialKable
Last active August 29, 2015 14:18
Show Gist options
  • Save KoaxialKable/9b2782c91fe9ac585739 to your computer and use it in GitHub Desktop.
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.
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