37.8k views
4 votes
Hurry Please What is the output for the following program?

numA = 5
while numA < 14:
numA = numA + 4
print(numA)
Output:

1 Answer

2 votes

Answer:

17

Step-by-step explanation:

In the first iteration numA = 5, thus numA = 5 + 4 (9)

In the second iteration numA = 5, thus numA = 9 + 4 (13)

In the third iteration numA = 5, thus numA = 13 + 4 (17)

In forth iteration numA = 17 is not less than 14, thus the loop exits.

User Dipstick
by
7.9k points