Ad
  • Custom User Avatar

    Sorry.. Duplicate post.

  • Custom User Avatar

    That makes sense. Back to the drawing board.

  • Custom User Avatar

    It fails when x = 1 because the b variable is set to x and a (a=0) + 1 is not less than b. This statement while a + 1 < b doesn't loop because 0 + 1 < 1 is not true. Therefore it doesn't loop and a (being 0) is returned. In is_sqrt(x) it squares the 0 that was returned in the other function and 0 is not equal to 1, meaning it returns false.

  • Custom User Avatar

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

  • Custom User Avatar

    Always print the parameter you get so you know where you code is going wrong. It's probably not a bug since so many people have passed the Kata and it hasn't been reported before. If you're still confused, just reply to my comment with your code and I'd be happy to help you (make sure to press the spoiler button so others can't see).

  • Custom User Avatar

    I run the my code and it passes everything except 1 (✘ Expected: true, instead got: false). It doesn't give me any information about which number or anything. Is this a bug?