C-17-Q047mediumsingle_mcq
In an if / elif / elif / else chain, the else block runs when:
In an if / elif / elif / else chain, the else block runs when:
- aAll preceding conditions are false
- bThe first
elifis true - cThe very first
ifis true - dThe program crashes
ব্যাখ্যা
The else block is the catch-all that executes only when the if and all elif conditions evaluate to false. If any earlier condition is true, else is skipped.