Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Change n = n/2 to n = n//2.

    When you divide by two, you create a floating point type number. Boolean operators will not work on floats and only work on integers. Floor division (//) will divide and floor the result, converting from float to integer.