Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

py if else if

# 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
Source by www.datacamp.com #
 
PREVIOUS NEXT
Tagged: #py
ADD COMMENT
Topic
Name
7+9 =