📜  py if else if - Python 代码示例

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

代码示例1
# Step 1
score_theory = 60
score_practical = 20

if(score_theory > 50):
    print("Please check the input score for 'Theory'.") # Step 2.1
elif(score_practical > 50):
    print("Please check the input score for 'Practical'.")  # Step 2.2
else:
    print("Score validated. Your total is: ",score_theory + score_practical) # Step 3