QUESTION IMAGE
Question
question # 3
multiple choice
what is the output of the following program?
numa = 2
while numa < 30:
numa = numa * 5
print(numa)
50
30
10
12
Step1: Initial value assignment
numA = 2
Step2: First - iteration check
The condition numA < 30 is true as 2 < 30. Then numA = numA 5=2 5 = 10.
Step3: Second - iteration check
The condition numA < 30 is true as 10 < 30. Then numA = numA 5=10 5 = 50.
Step4: Third - iteration check
The condition numA < 30 is false as 50>30, so the loop stops and the value of numA which is 50 is printed.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
50