Vidyalelo
Python · Q82

Python Loops and Conditionals: MCQs for Exam Readiness

Programming · Python · question 82

Q82

What will be the output of the following Python code? i = 2 while True: if i%3 == 0: break print(i) i += 2

A.
2 4 6 8 10 ...
B.
2 4
Answer
C.
2 3
D.
error

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board