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.
It also works perfectly in the reverse case of interpretation.
you updated the description, but not the tests. So the feedback is still as bad as before:
[]
as default argument but the test is failing without actually telling why.updated
This issue isn't actually resolved as long as the test feedback isn't actually correct/appropriate... ;)
I know this is incorrect, what I'm saying is that this code passes the sample tests. It shouldn't.
If a list is provided (even empty) it should also be returned, so this is incorrect. I'll update the description to make it clearer.
Ok, I understand what you mean now. Your solution is failing because you're actually mutating the default list, so it ends up as
[0]
. I could change the tests to only look at signature, but that's not really what I'm going for with this kata. Your solution will work if you slightly tweak it.Also, you're returning the same default instance when called with no argument, which is not the intended behavior. This is currently missing from the tests though.
This comment is hidden because it contains spoiler information about the solution
That's the thing: I have no idea why this test isn't passing because my code is following the specs of that test. And since I didn't pass the tests because of that one, I cannot see your code/tests so I have no idea.
Note that this means your second test isn't actually checking what it announced, but something related and "wider" instead.
EDIT: yes, about the last part.
This comment is hidden because it contains spoiler information about the solution
note: typo in the first message: read
meaning the WAY you're checking
Hi,
The above is utterly wrong as a sepcification. The sensical way to handle what the kata is asking for would be... see spoiler message below.
And this is even worse (I get that one on the second test. The previous was on the third):
while this is in my code:
def append_zero(lst=[]):
, meaning the why you're checking for this is incorrect.Cheers
Added some basic random tests
It was poorly worded, should be more accurate now.
This comment is hidden because it contains spoiler information about the solution
Loading more items...