Skip to content

Instantly share code, notes, and snippets.

@DrBluefall
Created June 23, 2019 02:44
Show Gist options
  • Save DrBluefall/34c16a3c31062cb15278b110da8d987d to your computer and use it in GitHub Desktop.
Save DrBluefall/34c16a3c31062cb15278b110da8d987d to your computer and use it in GitHub Desktop.
A small little fizzbuzz program.
"""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