I am doing the pratical lab about linear regression and the two exercise are pass, but the when i submit the pratical lab is do not pass and get the "Comment line with index: `UNQ_C1`

wasn’t found in code ".Can you help me, thanks!

Hi @Chim_Ka_Tok

Welcome to the community!

I think that you delete the comments

# UNQ_C1

# GRADED FUNCTION: compute_cost

before the function def compute_cost(x, y, w, b):

so please add these 2 comments because it’s necessary for auto grading

# UNQ_C1

# GRADED FUNCTION: compute_cost

Note please didn’t remove these comments in the next assignments because it’s necessary

Cheers,

Abdelrahman

Hello,

I am trying to run and submit the assignment, “C1_W2_Linear_Regression”, however, AssertionError: Case 2: Cost must be 2 but got 0 was happen, could you please help me out?

Hi @ANDUALEM_WELABO_TULU

Welcome to the community!

Did you pass all test cases of the assignment while you implement the code ?

Cheers,

Abdelrahman

Hello

dear Abdelrhaman,

Thank you for your reply, yea I have run the code starting from the first code cell.

Best,

Andualem.

sorry for confirmation I mean that all the code of you had written got **All test passed!** like this image

@ANDUALEM_WELABO_TULU

The error is in the function def compute_gradient(…), you should first doing loop over the number of training examples(samples m), after that in the for loop get the prediction using this equation f_wb = w*x[...]+b, and calculate the dj_db by this equation \sum (f_wb - y[...]) also dj_dw by this equation \sum (f_wb - y[...])*x[...]), to get the partial derivative for both dj_db & dj_dw, after the end of the loop and before return the values of dj_db & dj_dw you should divide both by number of training examples(samples m)

Note you can check also the hint below!

Best,

Abdelrahman

Hello Abdelrahman,

Hope all is well, I just completed the course, and I would like to thank you for your assistance, and what I want to ask you now is how can download my certificate from the coursera?

Best regards!

Andualem W.

Dear Abdelrahman,

I already able to download the certificate finally.

Thank you very much, for your time and help.

Best regards,

Andualem W.

im facing the same problem but with “UNQ_C2”

Hello @Aryan_Jain5,

The grader will complain if the first two lines above are removed or changed. Please make sure they are intact.

```
# UNQ_C2
# GRADED FUNCTION: compute_gradient
```

Next time, please open a new thread with a screenshot of the error message. This thread covers a long discussion and I am only assuming what your problem is and which assignment it is about. Thank you

Cheers,

Raymond

thanks a loti got it