# COMMON PASS / CONTINUE / BREAK MISTAKES
# Each block shows the wrong way, the error it produces, and the right way
# Read through — don't just run it top to bottom

# ─────────────────────────────────────────────
# MISTAKE 1 — Using pass when you mean continue
# ─────────────────────────────────────────────

# Wrong — pass does nothing, loop prints everything
for letter in "Bull":
    if letter == "u":
        pass
    print(letter)
# B / u / l / l — "u" still prints

# Right — continue skips the iteration
for letter in "Bull":
    if letter == "u":
        continue
    print(letter)
# B / l / l

# ─────────────────────────────────────────────
# MISTAKE 2 — break without a condition
# ─────────────────────────────────────────────

# Wrong — stops on the very first iteration
for letter in "Bull":
    break
    print(letter)    # never runs

# Right — break with a condition
for letter in "Bull":
    if letter == "u":
        break
    print(letter)
# B

# ─────────────────────────────────────────────
# MISTAKE 3 — Code after break or continue
# ─────────────────────────────────────────────

# This runs for all letters except "u"
for letter in "Bull":
    if letter == "u":
        continue
    print(letter)        # runs — outside the if block
    print("processed")   # also runs — outside the if block

# This never runs — it's after continue, inside the if block
for letter in "Bull":
    if letter == "u":
        continue
        print("skipped")    # never runs

# ─────────────────────────────────────────────
# MISTAKE 4 — Expecting else to run after break
# ─────────────────────────────────────────────

for letter in "Bull":
    if letter == "u":
        break
else:
    print("Done.")    # never runs — break interrupted the loop

# ─────────────────────────────────────────────
# MISTAKE 5 — continue outside a loop
# ─────────────────────────────────────────────

# Wrong — SyntaxError
# if True:
#     continue    # continue only works inside a loop

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

# pass       — does nothing, execution moves to next line
# continue   — skips the rest of the current iteration
# break      — stops the loop entirely — always use with a condition
# for...else — else is skipped when break fires
# continue and break only work inside loops
