Skip to content

Instantly share code, notes, and snippets.

@AO8
Created June 23, 2017 20:46
Show Gist options
  • Save AO8/48f2c36bdaa3c385e71673adc708ba23 to your computer and use it in GitHub Desktop.
Save AO8/48f2c36bdaa3c385e71673adc708ba23 to your computer and use it in GitHub Desktop.
Simple FizzBuzz Python Solution
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