QuestenaPractice that shows what to review next
Question 49

In one `if`, `elif`, `else` chain, both the `if` condition and an `elif` condition are truthy. Which suite executes?

  1. Only the suite under the first truthy `if` conditionCorrect answer
  2. Both the `if` and `elif` suites
  3. Only the `elif` suite
  4. The `if` suite followed by the `else` suite

Explanation

The chain selects the first truthy condition, executes its suite, and skips all later alternatives. Running the `elif` suite as well would treat mutually exclusive branches as independent `if` statements.

Continue with this test

Start practice
Question 49: In one `if`, `elif`, `else` chain, both the `if` condition… · Python Fundamentals · Questena