Module 1 Week 2 evaluation discussion problems

hello I recently uploaded my assessment for the Python Basics with Numpy Programming Practice Activity and although the file when I validate it gives me all the correct tests and does not give me any problems I continue to get a score of 88 and I get feedback that Tests failed on 1 cell(s)! These tests could be hidden but I can’t find anything that’s giving me an error, why is that?

Please post your question in the forum area for the course you are attending. These can be found via the topic menu on the left side of your browser.

If this is the DLS Course 1 Week 2 first assignment, that type of grader error probably means that you have referenced global variables from the body of one of your functions. E.g. instead of referencing the formal parameter to your function, you are directly referencing the variable that is being passed as that parameter in the actual function call. That will pass the test in the notebook, but will fail if the grader passes a different variable.

If those hints are not enough to get you to a solution, please check your DMs (Direct Messages) for a message from me about how to proceed. You can recognized DMs in your “feed” by the little envelope icon.

Thank you very much. I have worked with a fresh copy of the task and finally managed to fix the problem. I guess the problem was because I was adding additional lines of code outside the area specified by the evaluator. I was adding them to include the numpy library before each of the functions, evidently this was causing an error. Thanks for the guide and sorry for the repeated posting of the problem I will keep it in mind for future participation in the forum.

1 Like

I’m glad to hear that you solved it by getting a fresh copy. Yes, it’s only necessary to do the “import” once in one of the earlier cells in the notebook. The trick to remember is that you need to run all the cells from the beginning in order every time you reopen or restart the notebook. You don’t have to click each one: just use the “Cell → Run All Above” command.

1 Like