C1_W1 Assignment exercise 2 Invalid Syntax

{mentor edit: code removed}


File “”, line 31
theta = theta - (alpha / m) * np.dot(x.T,(h - y))
^
SyntaxError: invalid syntax


I’m not sure what’s causing this error for me since the indentation is fine and I believe I inserted the formula the correct way. I am new to this, so I’m not sure what is wrong.

Hi @a.n.sierra

Your code is missing a closing parenthesis in the line where you calculate J!

Tip:
Please do not share your code on the forum. That’s not allowed by the Code of Conduct.

The best method is to post a screen capture image that shows just the error message.

If a mentor needs to see your code, we’ll contact you with instructions.

1 Like

Thank you so much!

1 Like

Apologies. I will keep that in mind.

1 Like