-
-
Save DoubleMalt/f838c5efd5d376ccd30d496b8181ae60 to your computer and use it in GitHub Desktop.
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
answer = int(raw_input("select a number between 1 and 100: ")) | |
if answer < 1 or answer > 100: | |
print "Wrong number!" | |
else: | |
for x in range (1, answer + 1): | |
if x % 5 == 0 and x % 3 == 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