Sea Level Test Case Question

There is an issue with the test case test_plot_lines. The test case is expecting 170 y-data points, from the years 1880 to 2049, but the number of data points between the years 1880 and 2050 is 171. The challenge instructs us to predict the sea level in 2050, but the test case does not include an expected value for the year 2050. The last y-data point in the expected list in test_plot_lines is 10.11241067312443, which is the value calculated for the year 2049, not 2050.
When my code included the time frame from 1880 to 2050, the code failed the test_plot_lines test case, stating the y-data point for 2050 was not in the list of expected values. But when I altered my code to only include the time frame 1880 to 2049, it passed all the tests. The test case should be corrected to include the predicted sea level for the year 2050.

3 Likes

Was going to create a thread about this when I found yours. I agree that the unit test is incorrect in not including the datapoints for the year 2050. Also solved it the same way - by not including 2050 in my range limit.

The question clearly says, for the first estimate - “Make the line go through the year 2050 to predict the sea level rise in 2050.”

“Through” implies including 2050. And you have “sea level rise in 2050” which also implies that.

Same goes for the 2nd one: “Make the line also go through the year 2050 to predict the sea level rise in 2050…”

PS. This was the only one of the 5 projects which didn’t need pip installs for the packages (pandas), and they update on first run.