Question
What is the output of the following?i = 2while True: if i%3 == 0: break print(i) i += 2
Answer: Option B
Was this answer helpful ?
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.
Was this answer helpful ?
Submit Solution