Ad
  • Custom User Avatar

    Fixed this

  • Custom User Avatar

    Naruto0 & anter69 are correct. The Python test cases should look like this:

    test.assert_equals(shifted_diff("eecoff", "coffee"), 4)
    test.assert_equals(shifted_diff("Moose", "moose"), -1)
    test.assert_equals(shifted_diff("isn't", "'tisn"), 2)
    test.assert_equals(shifted_diff("Esham", "Esham"), 0)
    test.assert_equals(shifted_diff(" ", " "), 0)
    test.assert_equals(shifted_diff("hoop", "pooh"), -1)
    test.assert_equals(shifted_diff("  ", " "), -1)
    

    PEP8:
    Function names should be lowercase, with words separated by underscores as necessary to improve readability.

    mixedCase is allowed only in contexts where that's already the prevailing style (e.g. threading.py), to retain backwards compatibility.

  • Custom User Avatar

    I confirm: in python the test cases look for shiftedDiff while the final tests look for shifted_diff. Please fix

  • Custom User Avatar

    Thanks for the feedback, and good if you liked it!