In the future, please post your question in the forum area for that course.
It looks like that cell attribute has been changed from “Markdown” to “Code”.
You can fix that by using the “Cell” menu, then the “Cell Type” option. Set it back to “Markdown”. Then click on the cell again and press the “Run” button.
Hi @ParvaMakwana ,
It looks like your code cells have been shifted, and the definition for compute_gradient() has been moved below the test code that calls it. That is why you have the error.
The import statement, ‘import numpy as np’ should be at the top, the first code cell, where all the import statements are.
If you need to get a fresh copy of the assignment, you need:
- rename the current version by clicking the file tab to open the file directory and you will see your current lab file.
- click on the blue ‘?’ button on the top right of the Coursera window and follow the instruction.
I have updated my lab to the lastest version
Hi @ParvaMakwana ,
All the coding in the lab must be completed and passed their testcases before submitting to the grader. By posting just one line of error message is not enough to diagnose what the problem is and where it occurs.