Ad
  • Custom User Avatar

    Don't use sum and range for this Kata it will run out of memory with n = 27532435554730
    OverflowError: range() result has too many items

  • Custom User Avatar

    This would likely lead to overweighting kata, actually. Users would vote it higher than it really is to get more points. It was changed to a 6 recently.

  • Custom User Avatar

    Agreed. On the other hand some 7kyu-s Katas feel more difficult than this one.
    It would be better if we could give a kyu level after completion.
    That way Katas would have a better leveling.

  • Custom User Avatar

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

  • Custom User Avatar

    Don't mutate the input

  • Custom User Avatar

    Where can I submit a test bug-report?

    I'm passing the Sample tests on Python 2.6.7 but when I try to attempt I get this:

    Random test:

    Testing for [9,3]

    (!) It should work for random inputs too: 12 should equal 0

    9 + 3 = 12 as far as I know.

    I've tried 30x times already all random tests provide "should equal 0" messages.

  • Custom User Avatar

    My point is you do NOT need to know anything about the particular Morse codes, and you do not need any websearch skills to solve this (and the following) kata.

    Using not very standart code table is a feature to move the focus of the solution from Morse Code to Python (Java, C# etc.) code.

  • Custom User Avatar

    My bad, you are right. It is on the Wikipedia page, but is not searchable so we can't find it easily.
    We should test our coding skills on this site and not our websearch skills.
    It gives no additional value to the Kata if we have 40 key, value pairs or 180.

    These: {"!" : "-.-.--", "." : ".-.-.-",} key, value pairs are throwing errors in all Morse code translators too.

    If you would use International(ITU) characters only it would be an excellent Kata.

  • Custom User Avatar

    First of all, you're wrong, please check Wikipedia.
    Second, that should not bother you as the Morse Code table is preloaded in this kata and you should just use it without taking care of what's inside.

  • Custom User Avatar

    KeyError: '-.-.--'

    There is no such key in the whole International, American or Gerke Morse Code table.