Grading my 1st Assignment failed

I solved my 1st assignment in the Python course, and every time I submit I got zero, even I passed all tests. What should I do, and also, I saved the Jupyter file before submission.

(Solution code removed, as posting it publicly is against the honour code of this community, regardless if it is correct or not. You can share the errors you get)

(Solution code removed, as posting it publicly is against the honour code of this community, regardless if it is correct or not. You can share the errors you get)

Hi @Ahmed2907,

Firstly, it is against the honour code of this community to share solution code publicly. I have removed it.

As for the issue, if you pay close attention, you’ll notice that it is quite subtle:

Notice that you used, in your Exercise 1-B code cell, a variable avaliable_copies, when it should be available_copies (spelling mistake in the world available).

Please fix this and hopefully you’ll pass the grader as well.

If the issue remains, let me know.

Best,
Mubsi

Hi Mubsi,

I’m very sorry for sharing my code. I didn’t realize this and it was not my intention. I apologize for the inconvenience.

I also wanted to let you know that after correcting the error you mentioned, the submission passed successfully. However, I have one question: how were the tests able to pass when this error was present? Isn’t that a contradiction?

No worries, @Ahmed2907.

It is very likely that you first passed the test with the correctly named variable, and then later either by accident or maybe you were trying something, the name got changed. The name changed, but you didn’t execute the cell, which is why it was not registered by the notebook (it was still holding on the correct variable name).

This is why, at the end there are instructions to restart your kernel and re-run the entire notebook again to make sure everything runs as it should be. Please always do that before submitting the assignment for grading. It will help you catch errors, if any are present.

Best,
Mubsi