• + 3 comments

    Because, in Python, if you divide two ints, you would get the result of the integer division, in this case 0. But if the N is stored as a float, you are already forcing the floating point division here.