Machine_Learning_Coursera_Week2_C1_Linear_Regression


Can anyone know how to fix this issue?

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.

This error occured :frowning: , Please help

This is the cell

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:

  1. rename the current version by clicking the file tab to open the file directory and you will see your current lab file.
  2. click on the blue ‘?’ button on the top right of the Coursera window and follow the instruction.

There are all the imports statement in the first cell

I have updated my lab to the lastest version

1 Like

Help!!!

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.