adplus-dvertising
frame-decoration

Question

What is the output of the following?
x = 2
for i in range(x):
    x += 1
    print (x)

a.

0 1 2 3 4 …

b.

0 1

c.

3 4

d.

0 1 2 3

Posted under Loops in Python Python

Answer: (c).3 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