Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

what will the following program print when run? number_one = 5 number_t…

Question

what will the following program print when run?
number_one = 5
number_two = 10

if number_one == 5:
print(1)
if number_one > 5:
print(2)
if number_two < 5:
print(3)
if number_one < number_two:
print(4)
if number_one != number_two:
print(5)

Explanation:

Step1: Check first condition

number_one == 5 is True, so print(1) executes.

Step2: Check second condition

number_one > 5 is False, so print(2) does not execute.

Step3: Check third condition

number_two < 5 is False, so print(3) does not execute.

Step4: Check fourth condition

number_one < number_two (5 < 10) is True, so print(4) executes.

Step5: Check fifth condition

number_one != number_two (5 != 10) is True, so print(5) executes.

Answer:

1
4
5