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.
Out of specs, so no. Don't arbitrarily introduce feature creep (especially if it's pointless).
Also have you realized that everyone except you are clinging onto that definition? Maybe you haven't considered that fact that it's you who was wrong all along?
After 26,569 completions nobody is going to change the kata to do something else, the description is clear and states what you should consider a prime number and what not. Having another definition that applies to another set of numbers (integers vs natural) is pointless. Also, by your definition is p=±1 prime?
mmm I need to check my maths too, apparently... x)
I don't even know why we are discussing this when in the description it says:
That's wrong though, because by that you can also argue that
5
is divisible by-5
, and hence not a prime number ;-)The point is, when we do math related to prime numbers we only consider natural numbers, where negative numbers simply doesn't exist. It's excluded by definition.
you need to check your maths.
Definition of a prime: "number that is only divisible by 1 and itself."
-5
is divisible by5
=> not a prime.It seems you didn't read the kata description:
Err, no, it's not. Try returning
num > 0
and check if there is any tests that's not passing with a negative number.Have you read the prime number definition in the kata's description? No ambiguities there. The number passed to your function can be negative, but it won't be a prime number by definition.