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.
You can see there also the test it fails:
test.assert_equals(snail([[]]), [])
It's great that you ask for help and provide something to use: the error messages. They tell you that in line 11 you are trying to access a value at an index that is invalid for the container from which you are trying to access. I can't tell whether it is
jmin
that cannot be found insnail_map
or whetheri
cannot be found insnail_map[jmin]
, but that is how you can figure out what's wrong. I hope this helps you debug. Questions?This comment is hidden because it contains spoiler information about the solution
Start by printing the input to see which input makes your code fail.
From the code I can see, wrong datatype and a string is not an instance of int, so your code returns
None
. There is nolong
type in Python either (at least since 3.x). The function's name should bedescending_order
instead ofordenar
too.Uh, no idea then. We cannot help, we are sorry.
Unless you show. Your. Code. Se we can, you know, fix the kata.
Probably:
Kata is OK, and your code is most probably incorrect. Show us your code and we will tell you what's wrong with it.
115,370 completions say otherwise. Can you elaborate which test case you think is wrong?