Ad
  • Default User Avatar

    That was the case in python 2 as well though wasn't it?
    They visibly changed their python type, but that is a mostly cosmetic difference.

  • Custom User Avatar

    Integers in Python 3 are by default not bounded, i.e. memory is allocated dynamically upon request. However, floats are limited to double precision (64 bits), so there are rounding errors.

  • Default User Avatar

    look at the values involved in the failing tests
    you need to be able to exactly represent them through all your intermediary results

    in general, if something has to do with integers then you shouldn't ever involve float and if you "accidentally" get a float the answer is never to convert it back to int

    I marked your post as containing spoilers.

    When you test out the solutions of other people, please do so in a fork. Right now you have THIS solution as YOUR solution since you ran it in the kata itself.