Supervised ML: Regression and Classification--Wk 3 practice lab, ex5

RE: Ex5–Cost function for regularized logistic regression

Literally am stuck… have run all the other cells and passed all tests to this point. There is obviously some kind of syntax/code error (I am new to Python) but it is beyond me to figure it out. Have literally spent hours trying to sort. There are other queries on the board that are similar but none actually correct the issue completely. The hints also are not helpful in this instance–have followed them precisely and it did not fix the issue.


Any assistance is greatly appreciated.

Thank you. Replied to yours in DM.

Update for those who find this thread later:

You can either use a = a + b, or a += b, but don’t use both in the same line of code.