Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
It fails when x = 1 because the
b
variable is set to x anda
(a=0) + 1 is not less than b. This statementwhile a + 1 < b
doesn't loop because 0 + 1 < 1 is not true. Therefore it doesn't loop and a (being 0) is returned. Inis_sqrt(x)
it squares the 0 that was returned in the other function and 0 is not equal to 1, meaning it returns false.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).