The error message from codecademy tells you how you can reproduce the crash.
Reproduce that crash, and take note of where python's error message says it happened. Also take note of what it's saying can't be done - because that's what you were attempting to do.
Then consider what you were doing there, reconsider what you wrote (make sure you can argue for why it would do what you want)
If you don't know how to fix that, then google for the action you were trying to carry out in that location, or ask about that action.
Also, I suspect that you can't motivate what your
else is doing - and if you can't motivate what it does, then you can't have it in your code because you need to know what each thing in your code does. (Anything else would be like picking random words from a word list to write a story. You won't be in control of what that story is)