# Your code just learned to think
# if runs a block only when the condition is True

# ─────────────────────────────────────────────
# Basic if
# ─────────────────────────────────────────────

temperature = 35

if temperature > 30:
    print("It's hot outside.")    # runs — condition is True

temperature = 20

if temperature > 30:
    print("It's hot outside.")    # skipped — condition is False

# ─────────────────────────────────────────────
# Comparison operators
# ─────────────────────────────────────────────

x = 10

if x > 5:       # greater than
    print("greater than 5")

if x == 10:     # equal to (== not =)
    print("exactly 10")

if x != 7:      # not equal to
    print("not seven")

if x >= 10:     # greater than or equal
    print("at least ten")

if x <= 10:     # less than or equal
    print("at most ten")

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

score = 85

if score >= 60:
    print("You passed.")

age = 20

if age >= 18:
    print("Access granted.")

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

# if condition:        — colon is mandatory
#     block            — 4 spaces indentation, mandatory
#
# condition is True  → block runs
# condition is False → block is skipped, no error
#
# ==   equal to
# !=   not equal to
# >    greater than
# <    less than
# >=   greater than or equal
# <=   less than or equal
