Skip to content

Instantly share code, notes, and snippets.

@kiwiBBC
Last active November 14, 2017 20:40
Show Gist options
  • Save kiwiBBC/ed8832fbeb5b8b6c733ed23e5ee71e0f to your computer and use it in GitHub Desktop.
Save kiwiBBC/ed8832fbeb5b8b6c733ed23e5ee71e0f to your computer and use it in GitHub Desktop.
x = 1
answer = int(raw_input("select a number between 1 and 100: "))
for x in range (1, answer + 1):
if x % 15 == 0:
print "fizzbuzz"
elif x % 5 == 0:
print "buzz"
elif x % 3 == 0:
print "fizz"
else:
print str(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment