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.
Fixed.
Your code uses global vars and they keep their value between tests, that's a problam with your code, not with Codewars. Read the docs: https://docs.codewars.com/training/troubleshooting#your-solution-seems-to-work-or-is-close-to-working-but-still-fails-tests
In this case, you keep adding elements to the array and your code only checks the first 3. So, if the first test is giving you a 0, all the other tests will give you the same result.
OP passed the kata, closing.
You shouldn't import MorseCode, just call it as shown in the kata's description:
Your code returned 5 while the right answer is 2.
Grab a sheet of paper and a pen, draw that path, it goes north and then east 5 times each, see that you don't end where you started. Then rethink your code.
Neither of those, the one you get and the one you created (I still don't know why) take you back to the starting place. You shouldn't return true in that case.
Print the input to help you debug your code.
Closing the question then.
That test expects False, your code is failing another test.
The last one doesn't bring you back to the start, as the test label says.
They're not.
I already told you exactly which sample test your code is failing, use Pythontutor or other IDE to debug your code step by step and see what's wrong with it. Don't chain methods until you properly understand what they return in each of them, pull them apart and log what they return, you'll find out what's wrong with your code easier that way.
Your code is wrong, not a kata issue. If it has two chars less, why do you use the same length?
! is not a word, so you shouldn't append ay to it. Not a kata issue.
Loading more items...