Sea Level Predictor Chart looks fine, autotest says no

Tell us what’s happening:
My chart looks to be as per the written instructions.
The Autochecker gives me ‘…F.’ with the following error message:
“Arrays are not almost equal to 7 decimals…
(shapes (2,), (171,) mismatch)”
This appears to be saying that I’ve plotted my ‘best fit’ line using two points but the solution expected 171 points if I’m interpretting that correctly. Surely not an ‘error’ as a straight line does only need a start and end point?

Can any of you offer a better interpretation of the error message please?

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0

Challenge: Sea Level Predictor

Link to the challenge:

That’s the error exactly. A more nefarious camper could use any curve that passed through the two test points if the tests only used two points as required by the geometric definition. So the tests check many points on the lines to make sure that your line is actually correct.

The good news is that when I run the tests on your code, the first number is verified and your second one is correct, but should be the final number and not the second one.

Ha, thank you!
It took quite a while to work out how to make that line stop at 2050 rather than be an infinite line (start point + slope).

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.