Adjust division for Python 3

* Remove unnecessary conversions to float()
* Use integer division “//” where appropriate