Created
June 23, 2017 20:46
-
-
Save AO8/48f2c36bdaa3c385e71673adc708ba23 to your computer and use it in GitHub Desktop.
Simple FizzBuzz Python Solution
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
def fizz_buzz(): | |
for num in range(1,101): | |
if num % 5 == 0 and num % 3 == 0: | |
print("FizzBuzz") | |
elif num % 3 == 0: | |
print("Fizz") | |
elif num % 5 == 0: | |
print("Buzz") | |
else: | |
print(num) | |
fizz_buzz() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment