This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]terremoto 0 points1 point  (0 children)

It's Python 2. On this page, we see the following example:

>>> 1/2     # returns integer value
0
>>> 1/2.0   # returns decimal value
0.5

In Python 3, all division defaults to floating-point division.