Question
Which Python construct should be used to execute code only when a condition is true?
Select an option. Your answer will be checked instantly.
Correct Answer: D. `if`
Explanation:
An `if` statement controls whether a block runs based on a Boolean condition. It is the basic construct for conditional decision making.
Leave a Reply