C1_W3_Logistic_Regression - Example 2 stuck on code

Hello ML community,

I’ve been working on the final graded assignment in week 3 of this class. I think I know what the issue is but I keep getting “AssertionError” messages. Like many people here, I have put in many hours working on this graded assignment. I could use a mentors help. thanks :slight_smile:

1 Like

Please a post a screen capture image that shows the error you are seeing.

1 Like

Here are screen shots. the bottom one should be on top.


1 Like

General tips:

  • If you’re using a for-loop to compute the cost, check if you have the correct indentation. Python uses indentation to define blocks of code. It is critical you use it correctly.

  • If you’re doing any division, be sure you’re using enough sets of parenthesis to avoid this issue:
    1/2*m does not give the same answer as 1/(2*m)

1 Like

I’ll let you know how it goes.
Thank you

1 Like

got it
some spacing issues and an erroneous line of code.
thank you for your help