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.
This comment is hidden because it contains spoiler information about the solution
This is not the case. For example, x=2.
The action lambda x:0 results in 0,
and the action lambda x:x%2 results in 0 too
There is a trouble with python random test case -
a test should look as a tuple:
(command, number_to_operate_with, expected_result_of_operation, "explanation");
the command is in range 0..4. But in the test case we see random.randint(0,1000000)
It should be:
random.randint(0,1000000) % 5
or:
random.randint(0,4)
Thank you ))
This comment is hidden because it contains spoiler information about the solution
There are two things.
First, the description is misleading because of a typo:
should read:
not
apart
which may be understood asseparately
, buta part of word
, which meanstogether with word
The other thing is about tests. The tests should include strings with leading / trailing spaces and multiple spaces between words.
You write:
TestError: Expected: '', instead got: ' '
- expected an empty string with no characters, even a single space, and got a string of one character, space char.It's a special case and should be dealed separately.
The test cases are completely incomplete.
To my mind,
should be tested as inputs.
For now, almost all solutions fail at this data.
This comment is hidden because it contains spoiler information about the solution
The Instructions say nothing about the order of blocks themselves:
for the string "abacad" - "abcd-a-a" is a solution.
And "a-a-abcd" is also. And "a-abcd-a" is.
It should be explained explicitly, how to arrange the blocks.
Now, the solutions keeping "the natural order" are implicitly accepted.
Thanks
The description (for JavaScript) says:
"Only positive integers will be passed to the function (> 0 ), no negatives or zeros"
But there are test cases WITH zeros. And what is wrong with zeros?
If you have, for example, digits: 2, 1, 0 -- the smallest number you can create is
102,
NOT 012 == 12 !
Because 0 is NOT the part of number 12, and it IS the part of number 102!
So, the description and/or the test cases should be checked and updated.
A very funny description ))
I DO think so too
Since 0! is 1 (Yes. The factorial of zero is one, see https://en.wikipedia.org/wiki/Factorial), 0 is not a strong number. And 0 should be included in tests!
Loading more items...