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.
As a solution of this kata? Because truncating and rounding are two different things. If you mean in your code, the error message says this:
So you could try using some casting, but it won't work. You better try another function.
It can't be removed, but you also do not need to remove it. Just leave it as it is, it does not hurt anything.
You used
.strip
, there's "str" there.let me know if you need help to investigate it
Edit: python tests are ok, looks like your solution is bad:
You return empty spaces, this is the problem, and the empty space disappears when you sort your result
please, could you create the issue and leave your solution there? it must be rare case because 2000+ solutions were ok
...because this task is not about the sorting so I don't care about this part.
hi:) it means you can return an unsorted result and I will sort it for you and I will compare with the correct result(also sorted)
Minimum :)
Hi. This is a problem due to the design of the tests. You get this message when you return "It is not possible" and the tests expect an expression to evaluate. There is already an issue about this for Python (this is using the new framework and use clean tests, actually). You have to handle it (remember: when you get this error, you are returning that it is not possible while it is) or pass to another kata.
clearly not if it fails tests.
if a test case is found that your code fails, then yes you should look at that test case.
it's not mine any more than it is yours
yeah that's gibberish. but you can still look at the test case, as mentioned, by printing, which is quite common on codewars. and you won't get that test output any more (you'll need to reset to get the new basic tests or just use the test/submit button instead)
you haven't shown anything to be wrong
show, don't tell. provide actionable information.
(and in particular, because comments worded this way (saying there's a problem but not demonstrating it in any way) indicate that you haven't understood what happened and as such you don't know that the problem is with the kata rather than with your own code, and if someone that doesn't know what happened wrote code, then it's probably that code which is wrong. it might not be that way, but if it is that way then you're likely to express it like you did, and therefore when someone expresses it this way then it usually is this way)
this kata for python wasn't providing much more feedback than "wrong", but I mean you could still print and you're 2 kyu so you know that. just the same, I approved an update that was pending with better feedback which will show you input/output
You're mutating the input thus creating a wrong expected value for the original input values. I've changed the tests so the expected value is calculated before and that won't be happening anymore, but keep that in mind next time something like that happens to you. To avoid it, just don't mutate the input next time.
I agree, there is a mistery in the definition of the shift.
Someone below pointed the fact that in case of a shift differet of 0 or from the halft of the lenght of the arrays , the shift is not simply shift x '0' at the beginning of the second array, , 2 x shift x '0' at the beginning of the 3rd array and so on .
Here with a length of the arrays of 6, a shift of 3 ( identical to the test samples ) and 4 arrays , the real shift seems to be 6 and there are 9 ending '0' . So a total length of 6*4+9 = 33 that nothing in the initial description can explain.
you are wrong, you don't have to choose always the bigger number posible, you can get a better path sometimes going through the worst option.
Loading more items...