Я должен был сделать python упражнение для школы.
Это мой код:
print("Animal-determiner")
while True:
try:
amount = int(input("How many animals do you want to determine? "))
except ValueError:
print("That was not a number.")
else:
break
while amount > 0:
legs = int(input("How may legs does the animal have? "))
if legs < 0:
print("Such an animal doesn't exist.")
elif legs == 1 or 3:
print("Such an animal doesn't exist.")
elif legs == 0:
water = input("Does the animal live in water? ")
if water is "yes":
print("This is a fish")
elif water is "no":
print("This is a snake.")
else:
print("You didn't put in yes or no.")
elif legs == 2:
fly = input("Can the animal fly? ")
if vliegen is "yes":
print("This is a bird.")
elif vliegen is "no":
print("This has to be a bird, which can't fly.")
else:
print("You didn't put in yes or no.")
elif legs == 4:
print("This is getting to complicated, I'm stopping")
amount -= 1
Но когда я запускаю этот код, он всегда говорит: «Такое животное не делает не существует ". даже если я добавлю: 0 или 4, которые должны вернуть что-то другое
, помощь будет принята.