Created
September 2, 2016 07:24
-
-
Save PeterJatschka/a4dfa37a68c787c68b04c617463d5cf5 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
x=1 | |
zahl=int(raw_input("Gib eine Zahl zwischen 1 und 100 ein: ")) | |
while x < zahl: | |
if zahl >1 and zahl <100: | |
while x<=zahl: | |
if x %5 != 0 and x %3 != 0: | |
print x | |
elif x%5==0 and x%3==0: | |
print "fizzbuzz" | |
elif x%5!=0 and x%3==0: | |
print "fizz" | |
elif x%5 ==0 and x%3!=0: | |
print "buzz" | |
x +=1 | |
else: | |
zahl = int(raw_input("Das ist nicht zwischen 1 und 100, gib eine Zahl zwischen 1 und 100 ein: ")) | |
if zahl > 1 and zahl < 100: | |
print "Na also!" | |
continue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment