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.
In this kata, you don't need to use up all directions. In the third test case, you can get to the finish point by
("N","N","N","N","N","E","E","E","E","E")
moves. Then the expected answer is "Finish".the test case is wrong, I tried by my hand and found it wrong
I am pulling my hair out with this one. I got the cipher part easily enough once I figured out that you were counting spaces as characters for the shift. My problem is trying to split the message into an array. I went through the message, grabbing the number of characters and appending them as an element of a array, then stripping those characters from the front of the string, then get the next sequence of characters. This works fine, sometimes. Sometimes it strips an extra character (or two). For the life of me, I can't figure out why. The length of the string I am stripping is correct. I even though it might be having trouble with spaces, so I tried filling the spaces with a character. Same problem. There has got to be an easier way!
This comment is hidden because it contains spoiler information about the solution
Yes, those aren't the input values, that's what your function is returning instead of
None
. Print the input.If [1, 2, 34] should equal None, then shouldnt [9, 10, 0] equal None as well due to the double digit? What am I missing here?
Thanks! I forgot to make sure the input was single digits only. Doh!
In
[1, 2, 3, 4] should equal None
the first value isn't the input, it's the value your function returned, print the input yourself to see what it is.Maybe you have failed to verify the input array? Check that all the values are of type
int
and in [0, 9].This comment is hidden because it contains spoiler information about the solution
There are no fixed tests with those input values in Python, are you sure you're reading the logs ok? The log appears above the test result, not below it.
OK, I'm stumped. My code passes all the basic tests, but failed two of the random tests. Why are [1,2,3,4] and [1,1] invalid arrays that should return None? They both contain non-negative, single digit integers as specified in the instructions.