Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

question 20 4 pts given the following code, the else branch is taken fo…

Question

question 20
4 pts
given the following code, the else branch is taken for which range of x?
if x >= 15:

do something

else:

do something else

x <= 15
x < 15
x >= 15

Explanation:

Step1: Analyze if - condition

The if condition is x >= 15.

Step2: Determine else - condition

The else branch is taken when the if condition is false. The opposite of x >= 15 is x < 15.

Answer:

B. $x < 15$