Q.

What will be the output of the following
Python code?
for i in range(2.0):
print(i)

A. 0.0 1.0
B. 0 1
C. error
D. none of the mentioned
Answer» C. error
Explanation: object of type float cannot be interpreted as an integer.
1.3k
0
Do you find this helpful?
12

Discussion

No comments yet