When I do:
>>> x = 1
>>> y = 4
>>> x/y
0
It returns 0
instead of 0.25
because I didn't declare x
or y
as a float. But even when I do:
>>> x = 0.0
>>> x = 1
>>> y = 4
>>> x/y
0
It still returns 0
?
How can I perform floating point division on the integers x
and y
without using float(x) / float(y)
?