Last active
August 29, 2015 14:24
-
-
Save ibotdotout/067c8310320d21e7d78a to your computer and use it in GitHub Desktop.
FizzBizz Nested If
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
x = 105 | |
if x%7 == 0 and x%3 == 0 and x%5 == 0: | |
print("FizzBuzzBang") | |
elif x%7 == 0 and x%5 == 0: | |
print("BuzzBang") | |
elif x%7 == 0 and x%3 == 0: | |
print("FizzBang") | |
elif x%3 == 0 and x%5 == 0: | |
print("FizzBuzz") | |
elif x%7 == 0: | |
print("Bang") | |
elif x%5 == 0: | |
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