Presumably the function crashes (can’t see it all) and presumably the error message is testing for one thing, but reports something else. So both your code and codecademy’s code each has a bug.
specifically the test contains this code:
except TypeError: fail_tests("Your function should accept a parameter `word` and parameters `start` and `end`")
which is suggesting that a TypeError means that there are missing parameters … no it doesn’t, and function parameters can be inspected so there is no reason to do something this crude.