Ad
  • Default User Avatar

    Nope, not an issue. Kata works perfectly. Keep in mind that you are not just implementing the search function.

  • Custom User Avatar

    No problem :) thanks for the feedback!

  • Default User Avatar

    Thank you for explanation! Next time I will be more attentive.

  • Custom User Avatar

    As unnamed said, your job is to tell me if there is a substring that appears in both strings. In this case, "ocious" appears in both strings, so your function/method should return true. I'm marking this issue as resolved. If you have any other questions, feel free to ask.

  • Default User Avatar

    Given 2 strings, your job is to find out if there is a substring that appears in both strings. You will return true if you find a substring that appears in both strings, or false if you do not. We only care about substrings that are longer than one letter long.

    There is "ocious" and some other common substrings, so it works how it should.

  • Default User Avatar

    Python, Basic Tests:
    "False should equal True" for Test.assert_equals(substring_test("supercalifragilisticexpialidocious","SoundOfItIsAtrocious"), True)
    str2 has "n" and str1 has not. So should be False.
    Please fix.

  • Default User Avatar

    ['-3->0'] should equal ['-2', '0', '-1', '-3->-2']. Please fix.

  • Custom User Avatar

    Hi

    I tried to submit my solution, but I was told:

    “It should work for random inputs too – Expected: false, instead got: true”

    I then took the tests where I had failed, and ran them through my program using irb and the terminal.

    Surprisingly, the irb showed the program running as it should do, giving false when it was expected. Is this because of a flaw with irb?

  • Default User Avatar

    --- Just couple lines from output (tests between populations deleted)

    Random tests
    Dictionary populated with ['gypf', 'dhk', 'tgojx', 'ygchn']
    Dictionary populated with ['z', 'je', 'igm', 'uepwg']
    Dictionary populated with ['vp', 'ycap', 'gwqau', 'xm', 'aahua']
    Testing for y....
    It should work for random inputs too: True should equal False

    --- Why should equal "False"? 'y....' matches 'ygchn', so "True" should be. Or random tests work just with last population? Please explain.