The assignment is due tonight and I cannot figure out what’s wrong with my implementation. I keep receiving an “AssertionError” but I can’t understand what’s wrong with my code (screenshot below). I’ve attached a screenshot in which I simply cut/pasted the code from the hint and I still receive the error.
Can anyone give me a little guidance as to what I might be doing wrong?
Thank you for your answer. I do see now that the result is coming up incorrect. Based on the hint I do understand what the code is meant to be doing, but I’m at a loss as to where to begin creating the correct code or what variables to create for the code. Is there a step I’m missing somewhere in the process?
To be clear I’m not asking for the answer, but I just don’t know where to start to create the code.
You have hard-coded the value 97 into the function.
That is a mistake. Your code must work for any size of dataset.
There is a variable in the function that you should use instead of a hard-coded value.
TMosh, thank you. I was able to work it out once I stepped through the code based on the hints (my brain is now a pretzel of course). I appreciate your help in getting me there!