HARD LEVEL NESTED IF-ELIF-ELSE QUESTIONS

  1. Take age and citizenship.

    If age >= 18:

    If citizenship is "Indian" → Eligible to vote

    Else → Not eligible (citizenship issue)

    Else → Not eligible (age issue)

  2. Take marks in 3 subjects.

    If all marks >= 35:

    Calculate average:

    If average >= 75 → Distinction

    If 60–74 → First Class

    Else → Pass

    Else → Fail

  3. Take salary and experience.

    If salary > 50000:

    If experience >= 5 → Promotion eligible

    Else → Not eligible (experience low)

    Else → Salary too low

  4. Take username and password.

    If username == "admin":

    If password == "1234":

    Login successful

    Else:

    Wrong password

    Else:

    Invalid username

  5. Take a number.

    If number > 0:

    If number % 2 == 0:

    If number % 4 == 0 → Divisible by 4

    Else → Even but not divisible by 4

    Else → Odd positive

    Else:

    Negative or zero

  6. Take temperature.

    If temp < 0:

    If temp < -10 → Extreme cold

    Else → Freezing

    Else:

    If temp <= 30 → Normal

    Else → Hot

  7. Take income and age.

    If income > 300000:

    If age < 60 → Tax applicable

    Else → Senior citizen discount

    Else → No tax

  8. Take marks and attendance %.

    If attendance >= 75:

    If marks >= 40 → Pass

    Else → Fail (low marks)

    Else → Not eligible for exam

  9. Take 3 sides of triangle.

    If all sides > 0:

    If a+b>c and b+c>a and a+c>b:

    If all equal → Equilateral

    If any two equal → Isosceles

    Else → Scalene

    Else → Not valid triangle

    Else → Invalid input

  10. Take bank balance and withdrawal amount.

    If withdrawal <= balance:

    If withdrawal <= 20000 → Transaction approved

    Else → Limit exceeded

    Else → Insufficient balance

  11. Take two numbers.

    If first > second:

    If first % second == 0 → Divisible

    Else → Not divisible

    Else:

    Reverse logic and check

  12. Take electricity units.

    If units <= 100:

    Low bill

    Else:

    If units <= 300:

    Medium bill

    Else:

    High bill

  13. Take age and driving test score.

    If age >= 18:

    If score >= 80 → License approved

    Else → Retest required

    Else → Not eligible

  14. Take password length and content.

    If length >= 8:

    If contains digit:

    If contains uppercase:

    Strong password

    Else → Medium

    Else → Weak

    Else → Too short

  15. Take product price and customer type.

  16. Take age and health condition.

  17. Take exam score.

  18. Take time (24-hour format).

  19. Take number.