I've cracked my head for 2 hours without result. I tried changing the code but i don't understand what's wrong:
if input("Are you a male or female?: ") == "male" or "Male":
isMale = True
else:
isMale = False
if input("Are you tall or short? ") == "tall" or "Tall":
isTall = True
else:
isTall = False
if (isMale is True) and (isTall is True):
print("You are a tall male")
elif (isMale is False) and (isTall is False):
print("You are a short female")
elif (isMale is True) and (isTall is False):
print("You are a short male")
elif (isMale is False) and (isTall is True):
print("You are a tall female")`
Whatever I input it's just "You are a tall male" I do not understand why. Thank you in advance :)
Aucun commentaire:
Enregistrer un commentaire