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 think this solution partially correct. It will not handle negative numbers properly. Moreover, why you walk from 2 to number - 1 - it is super ineffective way to find prime number! Proper solution is when you go to the square root of the number using property that a * b = n and when a <= sqrt(n), b >= sqrt(n).
Why it would work for case num = 2 ? I anticipate that this solution will return false. Correct me, please, if I am wrong in my assumption.