Report Bug
Qus :

What will be the output of the following Python code?

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

Qus

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

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


A. 0.0 1.0
B. 0 1
C. error
D. none of the mentioned


Solution
C. error



Explanation
Object of type float cannot be interpreted as an integer.



Report Bug