Ad
  • Custom User Avatar

    Thanks a lot, I got it working now.

  • Custom User Avatar

    Please help!!!
    29 tests passed 1 failed in Python

    Testing for 'g rehs hmf sfkcsfksdem sp owwbxgtdr blnjfpk nntrvmih tjcfiekdb nvhmzc dnke aisswtdasv iuxfewnb lyk qhnz riilu ytg k dacrqy xjjmcsst ivbzvy fww'
    Expected 'aisswtdasv'

    Instructions: If two words score the same, return the word that appears earliest in the original string.

    'owwbxgtdr' should equal 'aisswtdasv'

    Why is that? 'owwbxgtdr' appears first in the original string so I do not understand why 'aisswtdasv' is the expected result.
    Am I missing something?

    Thanks

  • Custom User Avatar

    I couldn't figure it out. I was expecting the kata author to shed some light on this but I have not received a reply.

  • Custom User Avatar

    All my tests passed expect line4 in Ruby. when I do print array1 or array2 I can see that the 4th array1 is empty.
    According to the kata conditions ([] or nil) the result should then be false.
    I can't see why it is expecting true.

    ✔ Test Passed: Value == true
    ✔ Test Passed: Value == false
    ✔ Test Passed: Value == false
    ✘ Expected: true, instead got: false
    ✔ Test Passed: Value == false
    ✔ Test Passed: Value == false
    ✔ Test Passed: Value == false

  • Custom User Avatar

    same here with Ruby, when I do print array 1 or array2 I can see that the 4th line array is empty.
    According to the kata conditions ([] or nil) the result should then be false.
    I can't see why it is expecting true.

  • Custom User Avatar

    As others said below, there seems to be extra space issue.
    I was able to resolve this in Ruby using one of the ruby method that deals with spaces in a string.
    Try to lookup what method can help you in this case.

  • Custom User Avatar

    No luck so far.
    I will try again later.

    Thanks,

  • Custom User Avatar

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

  • Custom User Avatar

    Yes , I did enjoy it, thanks for the hint.

  • Custom User Avatar

    Sorry I forgot to mention, I am working with Ruby.

  • Custom User Avatar

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

  • Custom User Avatar

    Thanks for the hint. I got it!

  • Custom User Avatar

    Hi,
    In Ruby the test case 3 Test.assert_equals(median([10,29,23,94,76,96,5,85,4,33,47,41,87]),41)
    Is this right? Unless I am missing something I think it should be 48.

    Thanks,

  • Custom User Avatar

    I am referring to Ruby,
    for example: Expected: "spxNs!BUyH", instead got: "spxNsBUyH" but on my machine, using the same code I have spxNs!BUyH

  • Custom User Avatar

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

  • Loading more items...