我在python中的if / elif / else语句怎么了?

时间:2019-12-23 12:08:48

标签: python python-3.x if-statement

这是我的代码:

def ques():
isfem = input("Are you a female? ")
isshort = input("Are you short? ")
if(isfem and isshort=="True"):
    print("You are a short female")
elif(isfem and isshort=="False"):
    print("You are a tall male")
elif isfem and not(isshort):
    print("You are a tall female")
else:
    print("You are a short male")
ques()

尝试创建一个系统,询问您是否是女性,然后又矮了(用对/错回答),然后弹出回答说您是什么(例如,一个高个子的女性) 但是只有前两个在工作!!

0 个答案:

没有答案