# C1_W2_Linear_Regression("Comment line with index: UNQ_C1")

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

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

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

I know what you’re trying to imply, however I believe that code cell 10 is where I got stuck.

@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,

Thank you very much, for your time and help.

Best regards,
Andualem W.

I am happy to hear that , Congratulations @ANDUALEM_WELABO_TULU

Cheer,
Abdelrahman

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
`