Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    This solution might not be the shortest one, but it certainly is the most natural and simple. One can understand it from the first glance.

  • Default User Avatar

    try including the condition that i must be an integer or float as well as == 0

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    In Python 3, // is for integer division (5 // 2 == 2), whereas / is for float division (5 / 2 = 2.5), and the size of the number is irrelevant.

  • Default User Avatar

    For those who fail test cases with big numbers(approx. 28 out of 50) in Python 3.x: use operator "//" instead of normal "/". It has something to do with the way Python handles big numbers, if someone can explain it in simple terms please feel free to leave a reply