Ad
  • Custom User Avatar
  • Custom User Avatar

    301 warriors finished it succesfully. It's most probably some bug in your solution. BTW. 0r1CH4Lch0s has finally solved it.

  • Custom User Avatar

    It seems I have the same issue. Whenever I run the code in my IDE, it works as expected, if its ran on codewars random test, got at least 10 errors or so, though if I copy the random samples to my IDE, they all work just fine...

  • Custom User Avatar

    Sorry I accidentally flagged the above comment because it is hidden and I thought I was expanding it to see what it said.

  • Custom User Avatar

    OK, so I solved it (passed all the random tests - yay!).

    But then I attempted the exact same solution again and... I fail around the 30-40th random test.

    :(

    I ran my function on my local IDE and I was getting the same answer as in codewars. Not the answer it was saying I was getting. Strange.

  • Custom User Avatar

    Thanks!

  • Custom User Avatar

    Hi there! Now the template solution in Python removes only trailing spaces: better?

  • Custom User Avatar

    Yes. You are right. There is a bug in Python translation. I will ask @GiacomoSorbi to fix it.

  • Custom User Avatar

    I have passed all the test cases up until "Random Tests". I am working in Python 3.

    print de_nico("mguqh", "ahovcxmxanhchozghcimjp ilxgnsclz o") should equal 'oacvhxxnamhhzoccgmih jlipnxcsg loz', but I get "oacvhxxnamhhzoccgmih jlipnxcsg l oz" with my function.

    print de_nico("wemuto", "vhdanjrptrrugjan"), should equal "jvhnadurprrtgjna", but I get "jvhnadurprrt gj na" with my function

    print de_nico("uyt", "pmoemabhvgdjw") should equal "mopmaehvbdjgw", but I get "mopmaehvbdjg w" with my function.

    Once you have decrypted the key, it seems to me that the way to modify spaces, i.e. ' ', at the beginning of each row, into the output, is not well-defined.

    To clarify further, I have tried (after decrypting the key):

    1. removing all spaces ' ' so that no spaces are left in the output.
    2. removing only the spaces ' ' at the end of the final row, but keeping all other spaces in the output. I believe this is what is meant by removing "trailing whitespace".
    3. removing the spaces at the beginning of every row if there are any, but keeping the spaces at the end of each row, in the output.

    But none of these pass the "random tests".

    Thanks for help in advance