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.
I was actually tempted to use the isqrt function from the math module but didn't later do it before figuring out a better solution
The fact that your solution worked on your machine does not mean it was correct. Maybe your solution is wrong, and tests on your machine are also wrong and they cannot find the problem? Maybe you do something wrong on your machine, or differently than Codewars does?
"works on my machine" does not prove correctness of anything. To complete a kata on Codewars, it needs to pass tests on Codewars. Working on your machine does not help, and does not prove anything.
Your solution with
import math.sqrt
was not accepted most probably because it was not correct. We cannot tell why it was not correct, because we don't know what it was, but most probably it has nothing to do with importing themath.sqrt
, but rather using it incorrectly.