NIELIT O Level Exam

<p>What will be the output of the following Python code?</p><pre>for i in range(int(2.0)):<br>&nbsp; &nbsp; print(i)</pre><div><br></div>

What will be the output of the following Python code?

for i in range(int(2.0)):
    print(i)


निम्नलिखित Python कोड का आउटपुट क्या होगा?

for i in range(int(2.0)):
    print(i)

A. 0.0 1.0

B. 0 1

C. error एरर

D. none of the mentioned उल्लेखित कोई नहीं




Correct Answer is :

B. 0 1



Explanation
range(int(2.0)) is the same as range(2).
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad