Ad
  • Custom User Avatar

    same with python code.Need to remove d or retain it?!
    If d is retained as default value in case of in adequate subarray, then tests wont execute.
    If d is removed,the tests will run but throws up execution error as assertion,expects a second argument for success!

  • Custom User Avatar

    Something is wrong here..I get the right answer when I print the value before returning, but when the value is returned the return value is not same as the print statement just before that! Btw, the code is in python.
    print(distance) - this print right value
    return(distance) - the value returned is wrong here!

  • Custom User Avatar

    Thanks. I ran the code again, by just changing the variable name from i to counter. It was successful this time!
    Strange, but happy!!

  • Custom User Avatar

    Log says:
    'Bart, Lisa, Maggie, Homer & Marge'
    and I am returning the same result. Then why is the following error, when am not adding any extra bits?
    Must work with many names: "'Bart, Lisa, Maggie, Homer & Marge'" should equal 'Bart, Lisa, Maggie, Homer & Marge'

    Thanks for any pointers.

  • Custom User Avatar

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

  • Custom User Avatar

    Thank you. I added print statements. I was not aware of the availability of this facility in codewars IDE.
    So solved! Thanks again.

  • Custom User Avatar

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