adplus-dvertising
frame-decoration

Question

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

a.

2 4 6 8 10 …

b.

2 4

c.

2 3

d.

error

Posted under Python

Answer: (b).2 4

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