Discussion :: Python MCQs
-
What is the output of the following?i = 2while True:if i%3 == 0:breakprint(i)i += 2
Answer : Option B
Explanation :
The numbers 2 and 4 are printed. The next value of i is 6 which is divisible by 3 and hence control exits the loop.
Be The First To Comment