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.
Thanks!
simple check (2.3ms)
fixture:5
Assertion with == failed
code: make_negative(-42) == 42
lhs: -42
rhs: 42
stacktrace:
fixture:6
Test case make_negative(-42) == 42
is incorrect. broken.
This comment is hidden because it contains spoiler information about the solution
Good amount / 1
Good is_integer(n)
Beautiful!
Above code returns false for typer.isNumber(1).
How did this pass the unit test?
This is consise but slow.
We only need to check if i is diveded by primes less than i,
but this code checks all the number including composite numbers.
i.e, we only need to check if 11 is divisible by 2, 3, 5, 7,
but above code checks 2,3,4,5,6,7,8,9,10.