C3_W1_Assignment not grading properly

Hi there. I’ve completed the lab and my code matches all of the test cases. However, when I go to submit, I get 0’s for everything with the error "unsupported operand type(s) for *: ‘float’ and ‘NoneType’.

This leads me to believe that, for whatever reason, Coursera is grading an unedited version of the lab, even though I’ve completed it. Can anybody help?

Several things can cause this:

  1. Did you leave any of the “None” statements where you should add your own code?
  2. Did you re-name the notebook ipynb file name?

Thank you for the reply!

  1. Did you leave any of the None statements where you should add your code?
    Not in Exercises 1-9. I completed those, and the code matches the test cases. I left Exercise 10 blank due to time constraints. However, when I submit, I get 0% on all exercises not just Exercise 10, which leads me to believe that this isnt the issue.

  2. Did you rename the notebook ipynb file?

Not that I’m aware of…here’s the current name of the file:

“C3_W1_Assignment.ipynb”

However, I did delete and reinstall the file in an attempt to debug the issue. However, the issue existed before I reinstalled the file, which leads me to believe that reinstalling wasn’t the cause.

Thank you again for the reply!

You cannot submit a partially-completed notebook.

Ah I see. So even though everything else is completed, it will just give you 0’s if you have even one of the exercises blank?

Yes, that’s because the “None” that you left in your code makes the grader crash, since it causes a runtime error in that function.

If you complete the function such that it runs but doesn’t give the correct results, then you would get a zero for that function, and a non-zero score for the other correctly-working parts of the assignment.