C2-w1-assignment - Issue at assignment grading

Hi

My issue is about grading system

Function edit_two_letters unit tests I got 18 Tests passed, 2 Tests failed

Function get_corrections unit tests I got 6 Tests passed, 3 Tests failed

Function min_edit_distance unit tests I got 14 Tests passed, 2 Tests failed

But at final gradings I got 0/10 points for all those functions, why?

I don’t know for sure, but I guess the final test cases may not be the same as the unit test cases. It’s better to get all the unit tests right before submitting - even this may not guarantee a 100% score.

Hi @ahmed61 ,

The unit tests you passed are designed to check specific cases, but the final grading is based on a separate set of test cases used by the grader. Your code needs to handle a wider range of inputs and edge cases to pass all the grading tests. Try reviewing your implementation to ensure it works correctly for all possible scenarios, not just the provided unit tests.

Hope it helps! Feel free to ask if you need further assistance.

A couple of other points to add here:

  1. There is no guarantee that the grader gives partial credit. If you fail some of the tests in the notebook, that means there is something wrong with each one of those functions.
  2. If you get 0 for everything, one cause can be that there is some kind of syntax error or other exception when the grader runs your notebook. In that case, it doesn’t even get as far as being able to run your code, so you get 0 for everything. Click “Show grader output” and usually you will be able to tell that is the cause. This could be something like referencing global variables in your functions that are not present in the grader context.

In general, there is no point in submitting to the grader until you pass the test cases completely in the notebook. But as Alireza points out, even passing all the tests in the notebook is not a guarantee of success from the grader, because it may use different test cases.

Exactly true.