jeudi 26 mars 2020

im new to programming and i cant find why this code is not working like i want it to work [closed]

the problem is with the is_tall >> 175 for some reason it just keeps printing that he isn't tall even if I input a number bigger than 175

is_male = input("are you a male?: ")
is_tall =int(input("how tall are you: "))

if is_male == "yes" :
    is_male = True
else:
    is_male = False

if is_tall >> 175 :
    is_tall = True
else:
    is_tall = False

if is_tall and is_male :
    print("you are a male and you are tall")
elif not(is_tall) and is_male :
    print("you are a male but you are not tall")
elif is_tall and not(is_male) :
    print("you are not a male but you are tall")
elif not (is_male) and not (is_tall) :
    print("your are not a male nor tall")

Aucun commentaire:

Enregistrer un commentaire