elif statements
(equivalent to the else if in C language)
When we need to have more judgment, we tend to use a different syntactic expression, namely, using elif:
Python code
if judgment condition 1:
Execute Statement 1
elif judgment Condition 2:
Execute Statement 2
elif Judgment Condition 3:
Execute Statement 3
......
Else:
EXECUTE statement N
Now we have a task to complete, assuming
Now there's a score, You have his rank as follows:
90 points and above belong to A;
70 to 79 of C;
0 to 59 cents belongs to E;
You need to use the If/elif/else statement to output levels based on fractions.
Think about it a little bit!
more learning content, just in the code bud Net http://www.mayacoder.com/lesson/unit?id=24
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/87/34/wKiom1fXeFWh9b3fAABT4mE4wlM766.png-wh_500x0-wm_3 -wmp_4-s_535383830.png "title=" 44.png "width=" 370 "height=" 343 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:370px; height:343px; "alt=" Wkiom1fxefwh9b3faabt4me4wlm766.png-wh_50 "/>
Python Beginner Learning Basics Conditional Statement--ELIF statement