Initialization - first programming assignment, second course

For the first programming assignment in Improving Deep Neural Networks: Hyperparameter Tuning, Regularization and… I don’t understand why I am getting a syntax error for this line of code.

File "<ipython-input-9-a57500570b3a>", line 25 if (l == 1)
^
SyntaxError: invalid syntax

I want the code to check if l equals 1 so I can use the proper argument in the call to the np.zeros function.

Are you sure you’re not missing a close paren on the previous line? That’s usually the cause when you get a syntax error at the beginning of a line. Well, the other is indentation issues, but usually the error message is explicit in that case.

I tried the code in a python interpreter and got the same result. I am at a loss as to what is going on.

if (l == 1)
File “”, line 1
if (l == 1)
^
SyntaxError: invalid syntax

If statements end with colons in python, right? This is not c or Java or JS …

Note that these courses do not teach python: they assume python knowledge and experience as a prerequisite.

Thanks, I was missing a colon. Don’t know why I missed that . . .