Skip to content

Instantly share code, notes, and snippets.

@mscandizzo
Last active March 13, 2016 03:17
Show Gist options
  • Save mscandizzo/7f177e118655e472f371 to your computer and use it in GitHub Desktop.
Save mscandizzo/7f177e118655e472f371 to your computer and use it in GitHub Desktop.
FizzBuzz game
lists = []
for n in range(1,int(raw_input())):
if n % 3 == 0 and n % 5 == 0:
lists.append("FizzBuzz")
elif n % 3 == 0:
lists.append("Fizz")
elif n % 5 == 0:
lists.append("Buzz")
else:
lists.append(n)
for elem in lists:
print elem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment