📜  python代码示例中的if elif和else

📅  最后修改于: 2022-03-11 14:47:23.744000             🧑  作者: Mango

代码示例3
var_one = input("Give me a number: ")
var_one = int(var_one)
var_two = input("Give me another number: ")
var_two = int(var_two)

if var_one > var_two:
    print(f"First number, {var_one} is bigger")
elif var_one < var_two:
    print(f"Second number, {var_two} is bigger")
else:
    print(f"Both numbers are the same : {var_one}")