Skip to content

Instantly share code, notes, and snippets.

@wido
Created November 29, 2017 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wido/e5b51d4f2c15d6034630da79425ad73a to your computer and use it in GitHub Desktop.
Save wido/e5b51d4f2c15d6034630da79425ad73a to your computer and use it in GitHub Desktop.
FizzBuzz in Python 3
#!/usr/bin/env python3
for i in range(1, 100 + 1):
buf = str()
if (i % 3) == 0:
buf += "Fizz"
if (i % 5) == 0:
buf += "Buzz"
if not buf:
buf = i
print(buf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment