Week 3 Logistic Regression Practice Lab

It shows this error

Cell #17. Can’t compile the student’s code. Error: TypeError(‘compute_cost() takes 4 positional arguments but 5 were given’)
and code that ive written is this
#UNQ_C3

all the cells are running properly when I compile them but when I submit it shows this please help me

Hi. Please don’t post your on the forum. The error message shows that you are using one extra argument in the cost function, instead of four arguments as it was defined you’re passing five. This error is most likely in the execution part and not in the definition of the function itself.

Please let me know if this helps

still no luck its showing that the error is in the unchangeable code, idk what to do ive been stuck on this for weeks

Errors thrown by cells you cannot edit mean that it is testing one of the functions you modified, and it found an error.

Please post a screen capture image that shows the error you are seeing. Not a text copy-and-paste please.

hi, here you go


this shows that the problem is in the test code

Please post a screen capture image of the first 20 lines of the cell labeled “UNQ_C3” (the compute_gradient() function).

No, it doesn’t. It shows that the test code has thrown an error due to a defect in your compute_gradient() function.