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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
use MORSE_CODE['....'],it will return 'H'
Sorry, I thought this comment was for my another kata, so I answered unadequately. Mea culpa.
Also, thanks for finding a bug in the wording - it should be "extra spaces handling", not "extra zero handling". For some technical reason I can't edit the Test Cases any more (simply can't type in that window), @jhoffner, could you please make this replacement for me?
So, @Rohan.ag, the problem is about some extra spaces at the beginning and the end of the input - it is mentioned in the kata description, check it.
As for knowing the input, it's very simple - just print it. :) But not that console output here on CodeWars is HTML, so remember to wrap everything you print in <pre> tag to not miss anything important like extra spaces. :)
The JavaScript version could include instructions on how to access the morse code library.
thanx for a quick reply :)
but how come there are 0's when here everything is about . and -
and
is there any way i ccu know what is the input of the test case where my code is going crazy :p
"Extra zero handling" message means your code doesn't take proper care of extra 0's at the beginning and end of message.
"cannot concatenate 'str' and 'NoneType' objects" message means that somewhere in your code you do
a + b
, and in some situationa
happens to be a string andb
happens to be a None.What you're probably missing is that your code may work differently on different input data. :)
after 9 test getting successfully passed , i am getting a message "extra zero handling"
and also an error :cannot concatenate 'str' and 'NoneType' objects
what am not understanding is that if there's a problem in my code then the test should fail in the first case itself...why is it taking 9 test cases to check??
is there something that am missing?
language used: python
P.S. i had received this error while running test befre submitting but that time i had solved it
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution