Lesson 9 of 34
elif: రెండు కంటే ఎక్కువ ఎంపికలు
8 min 25 XP
రెండు కంటే ఎక్కువ ఎంపికలు ఉంటే elif (else if) వాడండి. Python పై నుండి కిందికి చూసి, మొదట True అయిన భాగాన్ని మాత్రమే నడుపుతుంది.
Example: edit me and press Run
Output Loading Python (first time takes a few seconds)
Press Run to see the result here.క్రమం ముఖ్యం! పెద్ద పరిమితిని (>= 35) ముందు పెట్టండి, లేకపోతే 40 కి కూడా “Warm” వస్తుంది.
ఇది ఒక షాప్ డిస్కౌంట్ ఉదాహరణ. Input box లో వేర్వేరు మొత్తాలు పెట్టి చూడండి.
Example: edit me and press Run
Output Loading Python (first time takes a few seconds)
Press Run to see the result here.