why 1 // 0.05 results in 19.0 in python?

Viewed 809

I'm a new to python and I found a confusing result when using Python3.5.1 on my mac, I simply ran this command in my terminal

    1 // 0.05

However, it printed 19.0 on my screen. From my point of view, it should be 20. Can someone explain what's happening here? I've already known that the '//' is similar to the math.floor() function. But I still can't get across to this.

3 Answers
Related