asked 217k views
0 votes
What is the value of numC when this program is executed?

numA = 4
numB = 10
if numA == 2:
numC = 10
elif numA > numB:
numC = 20
else:
numC = 30

asked
User Cleg
by
8.6k points

2 Answers

6 votes

Answer:

30

Step-by-step explanation:

What is the value of numC when this program is executed? numA = 4 numB = 10 if numA-example-1
answered
User Stefan Falk
by
8.2k points
6 votes

numA = 4 and numB = 10

for the if statement to run, numA has to equal 2, which it doesn't.

for the elif statement to run, numA has to be greater than numB, which it isn't.

That leaves the else statement, therefore, numC = 30