it's because python (2.7) needs a float in denominator or numerator to return a float.
in python 3.x any division returns a float
You can also 'fix' in python 2.7 that by using :
from __future__ import division
In fact python follow the integer division rules and return an integer and not a float number