निम्नलिखित प्रोग्राम का आउटपुट क्या है?
What is the output of the following program ?
i=0
while i<3:
print(i)
i+=1
else:
print 0
A)
B)
C)
D)
Explanation:
The program prints the values of i
from 0 to 2 inside the while
loop, and then prints 0
from the else
block after the loop finishes.
Output:
(B) 0 1 2 0