Created
June 11, 2019 12:52
-
-
Save dfetterman/3b31f4318d177d5272ca2e782e2565cf to your computer and use it in GitHub Desktop.
Dane Fetterman's version of 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
for x in range(1, 101): | |
if (x % 5 == 0) and (x % 3 == 0): | |
print('FizzBuzz') | |
elif x % 5 == 0: #means x is exactly divisible by 5, therefor it is a multiple of 5 | |
print('Buzz') | |
elif x % 3 == 0: | |
print('Fizz') | |
else: | |
print(x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment