I am able to get the expected output, yet the above error is being showed. In fact I even tried using the exact code that was given in in Hints just to see where I went wrong but to no avail.
I am facing the same issue with Exercise 4 and 5 but couldn’t attach their screenshots as only one image is allowed.
As a result of this I am unable to achieve the required grades.
The error refers to “nan”. That means “not a number”.
There is more than one test of your code.
I suspect that for one of the tests, your code is trying to divide by zero. That will give a “nan” result error code.