215k views
0 votes
When does the following while-loop stop running?

var = 1
while var == 1 :
num = num+1
print (num)

A. As soon as num reaches the value of 10
B. After the first time through the loop it stops
C. It never stops running
D. None of the above

1 Answer

4 votes

The loop never stops running because the value of var is always 1.

User Giang Le
by
6.7k points