Created
June 23, 2019 02:44
-
-
Save DrBluefall/34c16a3c31062cb15278b110da8d987d to your computer and use it in GitHub Desktop.
A small little fizzbuzz program.
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
"""Small little fizz buzz program.""" | |
def fizz_buzz(): | |
i = 1 | |
while i != 1001: | |
output = "" | |
if i % 3 == 0: | |
output = output + "Fizz" | |
if i % 5 == 0: | |
output = output + "Buzz" | |
if output == "": | |
print(i) | |
else: | |
print(output) | |
i += 1 | |
if __name__ == "__main__": | |
fizz_buzz() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment