How do `if`/`elif`/`else` run exactly one branch — and why does a chained `elif` behave differently from stacking separate `if`s?
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
The temperature is given as temperature = 30.
Using an if / else statement, assign to status the string "hot" when the temperature is above 25, and "mild" otherwise.
Simple if and the if/else pair
Write the general form with its colon and indented block, then a short program with a false if condition, marking which block runs and which lines Python skips.
elif chains versus two independent if statements
State that a chain runs only the block of the first true condition, and trace one value through an if/elif/else chain and through two separate if statements.
Mandatory indentation and the colon
Record that indentation is required in Python and marks which lines belong to a condition, and write one example where shifting a line's indentation moves it into or out of the block.