Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

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

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
Explanation: Object of type float cannot be interpreted as an integer.

Join The Discussion