I am getting a grading error in all the assessment(word translation) functions despite it passed all the test cases
Passing notebook testcases is not enough for passing the grader! Avoid hard-coding values and make sure your code handles all cases.
Hope it helps! Feel free to ask if you need further assistance.
Alireza has made the key points here already, but it might also help for us to see what the grader output actually says. Click “Show grader output” and post a screenshot of that.
If you get 0 for everything, usually the problem is that there is a syntax error somewhere. If the grader can’t compile the code, then it can’t run any of the tests. Sometimes those messages give at least a clue as to where to look.
Also don’t forget that one form of the “hard-coding” that Alireza warns against is referencing global variables from within the body of your functions. If you directly reference the value that happens to be passed as an argument in the notebook test case, then it works in the notebook but “throws” with an “undefined reference” error when the grader passes a different variable in its test case. That would cause the “0 everywhere” phenomenon.
yes I am getting zero everywhere and unexpected errors in all the functions, I’ve checked the syntax error but it doesn’t exist
Visit the Discussion forum to see if your peers are experiencing or have found resolutions for similar errors. If the error isn’t resolved in 24 hours, please reach out to Coursera through our Help Center.
Here’s a topic on the DLS FAQ Thread that talks about that grader error, among others. Please try the remedies mentioned there and let us know if that helps or not.
No I’ve tried all the above solutions but it didn’t work
If you are confident of your codes, then I want you to do the below steps.
Get a fresh copy of the assignment by following the below link
Now once you have got a fresh copy, make sure write codes only between ###START and END CODE HERE### especially only replacing None between these markers.
Do not edit any other part of cells, or remove any part of header which mentions Grade 1 or mentions grade cell headings.
Do not add any codes in unit test cells.
You re-write the codes referring to your old copy but make sure only mentions codes where it is instructed to do so.
Let me know if this give you a different result.
Regards
DP
Yes this works
thank you