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.
Make sure to print inputs and outputs of your functions.
Having the same issue as RONAEED but don't quite understand the suggested advice to fix this?
it's probably because you're trying to split a string that has space on it's end so it gives you something like that:
"rona ".split(' ') ==> ['rona', ''],
and you're probably pulling dictionary[''] which raises an error.. that was my case anyways
i just trimmed the spaces on the end of the morseCode (morseCode.strip())
good luck
You're the man bro
I figured the problem as I saw the test case as you said.. thanks.
In Python, try
print(morseCode)
I keep failing the 10th test case without actual reason..
Test Results:
Example from description
Test Passed
Basic Morse decoding
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
STDERR:
Traceback:
in
in decodeMorse
KeyError: ''
whatever I tried on my IDE works just fine.. can I get the 10th test case? 'cause it's working fine and I don't wanna forfeit..
I pass all the tests on python except..
Test Results:
Example from description
Test Passed
Basic Morse decoding
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
Test Passed
STDERR:
Traceback:
in
in decodeMorse
KeyError: ''
whatever I tried on my IDE works just fine.. can I get the 10th test case? 'cause it's working fine and I don't wanna forfeit..
Thanks, I will try
you could have created the dictionary with a loop instead
that's good to know, thanks!
You don't have to put '0' in 'range()', it's already included