NIELIT O Level Exam

<p>What will be printed?</p><p><span style="font-size: 14px;">i = 0</span></p><pre><span style="font-size: 14px;">while i &lt; 3:<br></span><span style="font-size: 14px;">&nbsp; &nbsp; i += 1<br></span><span style="font-size: 14px;">&nbsp; &nbsp; if i == 2:<br></span><span style="font-size: 14px;">&nbsp; &nbsp; &nbsp; &nbsp; continue<br></span><span style="font-size: 14px;">&nbsp; &nbsp; print(i, end=" ")<br></span><span style="font-size: 14px;">else:<br></span><span style="font-size: 14px;">&nbsp; &nbsp; print("END")</span></pre>

What will be printed?

i = 0

while i < 3:
    i += 1
    if i == 2:
        continue
    print(i, end=" ")
else:
    print("END")


निम्न code क्या print करेगा?

while i < 3:
    i += 1
    if i == 2:
        continue
    print(i, end=" ")
else:
    print("END")

A. 1 2 3 END

B. 1 2 3

C. 1 3

D. 1 3 END




Correct Answer is :

D. 1 3 END



Explanation
When i=2, continue skips print(). The loop ends normally, so else prints END.

i=2 पर continue के कारण print() skip होता है। Loop सामान्य रूप से समाप्त होता है, इसलिए else से END print होता है।
Latest Current Affairs 2026 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad