QUESTION IMAGE
Question
what is the output for the following program? numa = 10 while numa < 21: numa = numa + 5 print(numa) output:
Step1: Initialize variable
numA = 10
Step2: First loop iteration
numA = 10 + 5 = 15 (since 10 < 21)
Step3: Second loop iteration
numA = 15+ 5 = 20 (since 15 < 21)
Step4: Third loop iteration
numA = 20 + 5 = 25 (since 20 < 21)
Now 25 is not less than 21, so the loop stops.
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
25