Ad
  • Custom User Avatar

    LOL, in my posting the last sentence says "It should be "k mg s". There appears to be only one space between k and m, when I copy to notepad. When I edit the post, there are two spaces. I guess the same thing happened in the example.
    (2 spaces in edit mode) "k mg s"
    (1 spaces in edit mode) "k mg s"
    This is a nice behavior, thx for making the Kata anyway. It was good fun.

  • Custom User Avatar

    The space was there but quite invisible, I modified the string, enclosing it with backticks. Thanks for your post!

  • Custom User Avatar

    I gues meteogish talks about your example in the Kata description, "I was going fishing that morning at ten o'clock". The code for this string is shown in the example as "c nhsoI\nltiahi \noentinw\ncng nga\nk mg s\n\voao f \n\v'trtig". Every word has 7 characters, except the fifth word "k mg s", which has 6 characters. There is a space missing. It should be "k mg s".
    Cheerio.

  • Custom User Avatar
  • Custom User Avatar

    No answer?

  • Custom User Avatar

    I don't understand what you are saying because I don't see any assert string beginning with "c nhsoI\nltiahi \noentinw\ncng nga...". Could you be more precise?
    Where do you see that? What was the string to code? Did you take the Javascript kata?

  • Custom User Avatar

    Hi g964, thank you for this interesting challenge.
    I'm done this task in Xcode in Swift because I learning it now. But want pay attention to your testing examples.
    In your example of "coding" result in your coded string there are 2 spaces after "\nk" before "mg" so the assert string will be

    "c nhsoI\nltiahi \noentinw\ncng nga\nk{TWO SPACES HERE}mg s\n\voao f \n\v'trtig"

    to pass the code() function tests well.

  • Custom User Avatar

    The same issue in Test 5

    Test5
    ✘ Expected: True
    But was: False
    at AreTheySameTests.Test5 () <0x40826f20 + 0x0009f> in :0

    a [ 121 144 19 161 19 144 19 11 1008 ]
    b [ 121 14641 20736 36100 25921 361 20736 361 ]
    Not found 190

    190 * 190 = 36100 that is exists in b
    but there are no 190 in a