C1W2 Assignment - Unable to pass despite passing grader’s tests

I cleared the kernel before re-running all the cells. Made sure I got ‘All tests passed’ before submitting the assignment. Still got only a 41.

Kernel → restart and clear all output
Cell → run all

Also printed the values that the grader was using and did some basic math on at least one of the samples to make sure the calculation was correct. See screenshots below.

Passing the build-in tests does not guarantee your code will pass the grader.
The grader uses entirely different tests.

The first thing to check is whether your code will work for any set of data - or only when run within the notebook.

Please post a screen capture image that shows the detailed feedback from the grader.

Pls see above.

I updated the code to print values used by grader and included that in the screenshots of my original msg. While I don’t know for which data set the grader is expecting the results provided in the feedback, but I do see the expected results for a dataset (as can be seen in the screenshots of my previous msg).

I recommend you not try to inspect the grader’s test cases. That’s not the best way to earn your grade.

Check if your added code inside the functions is using the data that is passed as parameters.

That was the first thing I validated by printing the parameters and calculated values within the function. And they are working as expected.

That is when I noticed the data sets used by the grader and results calculated by the functions.

If I recall correctly, you cannot see the results for the grader’s test cases - because it uses an entirely different execution environment. Its outputs are not output to your browser - all you see are the grader’s error messages and results.

Hi. Your initial three screenshots show “unsaved changes” up top. Make sure to save your work first before submitting to the grader. Hope this helps.

Example:

Use “File->Save and Checkpoint”.

Thanks @chris.favila . That helped.

Great! Glad it was solved. Will close this topic now.