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” എന്ന് print ചെയ്യും.

ഇതാ ഒരു കടയിലെ discount ഉദാഹരണം. Input box-ൽ വ്യത്യസ്ത തുകകൾ പരീക്ഷിക്കൂ.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

Challenge

+25 XP

input() ഉപയോഗിച്ച് marks വായിച്ച് grade print ചെയ്യൂ: 90 അല്ലെങ്കിൽ കൂടുതൽ → A 75 അല്ലെങ്കിൽ കൂടുതൽ → B 50 അല്ലെങ്കിൽ കൂടുതൽ → C മറ്റെല്ലാം → Fail

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.