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-ல் வேறு தொகைகளைக் கொடுத்துப் பாருங்கள்.

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

மதிப்பெண்ணை (marks) input() மூலம் பெற்று 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.