Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Nope, not an issue. Kata works perfectly. Keep in mind that you are not just implementing the search function.
No problem :) thanks for the feedback!
Thank you for explanation! Next time I will be more attentive.
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.
There is "ocious" and some other common substrings, so it works how it should.
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.
['-3->0'] should equal ['-2', '0', '-1', '-3->-2']. Please fix.
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?
--- 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.