程序未运行

时间:2019-09-26 13:51:31

标签: python jupyter-notebook

我正在尝试运行代码,但是它不起作用,而且如果有任何错误,我似乎找不到错误

def question3():
x= input("Enter the first value:")
y= input("Enter the second value:")
z= input("Enter the third value:")
if x==y==z:
    print("All three inputs have equal values" + x)
elif x==y:
    print("x and y have equal values" + x)
elif x==z:
    print("x and z have equal values" + x)
elif y==z:
     print("y and z have equal values" + y)
else:
    print("All three inputs have different values")

1 个答案:

答案 0 :(得分:1)

def question3():
    x= input("Enter the first value:")
    y= input("Enter the second value:")
    z= input("Enter the third value:")
    if x==y==z:
        print("All three inputs have equal values" + x)
    elif x==y:
        print("x and y have equal values" + x)
    elif x==z:
        print("x and z have equal values" + x)
    elif y==z:
         print("y and z have equal values" + y)
    else:
        print("All three inputs have different values")
    return