Vidyalelo
Python · Q79

Python Loops and Conditionals: MCQs for Exam Readiness

Programming · Python · question 79

Q79

What will be the output of the following Python code? i = 0 while i < 5: print(i) i += 1 if i == 3: break else: print(0)

A.
0 1 2 0
B.
0 1 2
Answer
C.
error
D.
none of the mentioned

Answer: Option B

Solution

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