# Split the decision. Again.
# elif adds more conditions between if and else

# ─────────────────────────────────────────────
# Basic if / elif / else
# ─────────────────────────────────────────────

score = 72

if score >= 90:
    print("Excellent.")
elif score >= 70:
    print("Good.")         # runs — first match
elif score >= 60:
    print("Passed.")       # skipped
else:
    print("Failed.")       # skipped

# ─────────────────────────────────────────────
# Order matters — most specific first
# ─────────────────────────────────────────────

score = 95

# Wrong — broken logic
if score >= 60:
    print("Passed.")       # always runs first, even for 95
elif score >= 90:
    print("Excellent.")    # never reached

# Correct — most specific condition first
if score >= 90:
    print("Excellent.")    # runs
elif score >= 60:
    print("Passed.")       # skipped

# ─────────────────────────────────────────────
# elif without else
# ─────────────────────────────────────────────

temperature = 20

if temperature > 35:
    print("Very hot.")
elif temperature > 25:
    print("Warm.")
elif temperature > 15:
    print("Comfortable.")   # runs
# no else — if nothing matches, nothing prints. no error.

# ─────────────────────────────────────────────
# Real use case
# ─────────────────────────────────────────────

age = 25

if age < 13:
    print("Child.")
elif age < 18:
    print("Teenager.")
elif age < 65:
    print("Adult.")         # runs
else:
    print("Senior.")

# ─────────────────────────────────────────────
# Quick reference
# ─────────────────────────────────────────────

# if condition_1:       — checked first
#     block A
# elif condition_2:     — checked if condition_1 failed
#     block B
# elif condition_3:     — checked if condition_2 failed
#     block C
# else:                 — runs if nothing matched (optional)
#     block D
#
# Python stops at the first match — the rest are skipped
# most specific conditions always go first
