Ad
  • Custom User Avatar

    Yeah in JS yesterday it took me about an hour to get it working, but way too slow! Still haven't been able to improve it. May need to start over.

  • Custom User Avatar

    It took me about an hour to write it in Python mostly because I was having a difficult time returning the solution even as I was able to print it.
    What took me the longest time was to rewrite it in C++ as that is the language that I wanted to solve it.

  • Custom User Avatar

    Still there's the same problem with Python3, there's print() expression issue in test,
    as well as another one i get, if needed:
    Traceback (most recent call last):
    File "main.py", line 14, in
    testAndPrint(decodeMorse(decodeBits('1')), 'E')
    File "/home/codewarrior/solution.py", line 6, in decodeMorse
    return ' '.join(''.join(MORSE_CODE[letter] for letter in word.split(' ')) for word in morseCode.strip().split(' '))
    File "/home/codewarrior/solution.py", line 6, in
    return ' '.join(''.join(MORSE_CODE[letter] for letter in word.split(' ')) for word in morseCode.strip().split(' '))
    File "/home/codewarrior/solution.py", line 6, in
    return ' '.join(''.join(MORSE_CODE[letter] for letter in word.split(' ')) for word in morseCode.strip().split(' '))
    KeyError: '1'

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar
  • Custom User Avatar

    See the discussion down below with MastaB. Especially the last comment contains some hints.

  • Default User Avatar

    OK. "There are no traps in this format." is about hours, minutes, seconds:-)

  • Default User Avatar

    I can be wrong but I don't think so. 35 guys passed the R kata. Either with ", " or "," you can split... Moreover you passed the kata:-)