adplus-dvertising
frame-decoration

Question

What is the output of the following?
i = 0
while i < 3:
    print(i)
    i += 1
else:
    print(0)

a.

0 1 2 3 0

b.

0 1 2 0

c.

0 1 2

d.

error

Posted under Python

Answer: (b).0 1 2 0

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the following?

Similar Questions

Discover Related MCQs