Shouldn't solving it to match the test be discouraged? Its an issue that should not take much time to correct but is an issue nonetheless. Can't deny though, its a useful kata!
The problem is that CW do not support printing of unicodes when using python, even if python itself can handle them. So what are facing here (I believe) is that your code return a wrong result, this result raise an error that is printed in the console, and that cause the failure. And changing the output will not solve anything because the expected answer will still be displayed.
But what's "cool" in that, is that you still get the expected value in the failure message when you return the empty string... ;) So now, you just have to correct your code.
Only in computer science there is no debate about 0 being positive. If you consider a number n to be positive if and only if n > 0, then it makes perfect sense. You do not check for the 0 then. The array [0] then contains a negative element for each positive element.
Fixed, user now always recieves winnable game state.
Idea isn't mine, please checkout the comment linked in the description!
Good catch. I had the arguments backwards in my tests. Rookie mistake. I have fixed the bug and republished. Thank you!
I've fixed that yesterday.
Not an issue. The result can be calculated exactly.
Fixed
Fixed it.
Shouldn't solving it to match the test be discouraged? Its an issue that should not take much time to correct but is an issue nonetheless. Can't deny though, its a useful kata!
I solved it to match the test case, all the easier.
The problem is that CW do not support printing of unicodes when using python, even if python itself can handle them. So what are facing here (I believe) is that your code return a wrong result, this result raise an error that is printed in the console, and that cause the failure. And changing the output will not solve anything because the expected answer will still be displayed.
But what's "cool" in that, is that you still get the expected value in the failure message when you return the empty string... ;) So now, you just have to correct your code.
Only in computer science there is no debate about 0 being positive. If you consider a number n to be positive if and only if n > 0, then it makes perfect sense. You do not check for the 0 then. The array [0] then contains a negative element for each positive element.
Also,
expected
andactual
in the tests are reversed.Similarly, it looks like you intended to say length of numbers/integers, rather than digits (in the last sentence of the Description).
Which language?
This comment is hidden because it contains spoiler information about the solution
Loading more items...