QUESTION IMAGE
Question
what is the output of this program? numa = 10 for count in range(5): numa = numa + 2 print (numa) output:
Step1: Initialize variable
numA is initialized as 10.
Step2: First iteration
In the first iteration of the for - loop, numA = numA+2, so numA=10 + 2=12.
Step3: Second iteration
In the second iteration, numA = 12+2 = 14.
Step4: Third iteration
In the third iteration, numA = 14+2 = 16.
Step5: Fourth iteration
In the fourth iteration, numA = 16+2 = 18.
Step6: Fifth iteration
In the fifth iteration, numA = 18+2 = 20.
After the loop finishes, the value of numA 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
20