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.
great solution my friend
No check for -ve?
okay i get it now. You used the isSquared() method which checks if a number is positiv or negativ
This comment is hidden because it contains spoiler information about the solution
wtf
Nice
Niceeeee !
Nice one!
The modulo operator (%) returns the remainder after dividing two numbers. If a number is divisible by another, the remainder will be 0, ergo the modulo operation will return 0. In this case, we are checking if a number is an integer. Math.sqrt(n) % 1 will only return a value other than 0 if the return value of Math.sqrt(n) is a decimal, since every integer is divisible by 1. Hope that helps. :)
One line solution, nice!
This really helped me simplify my code. Definitely did not think about it like this!
This comment is hidden because it contains spoiler information about the solution
That's really smart!
Nice one!
what is the return type of sqrt function.Isn't it double? or it depends upon the type of argument passed.
If is is double thn why IDE's only print int if the number is a perfect no.
ex. sqrt(9) : 3 Why not 3.000000000000000 or 3.0 ?
Loading more items...