Course 1 Week 3 Ex2 error

In exercise 2, I am able to get the value correct
|Cost at initial w (zeros)|0.693

but with the # Compute and display cost with non-zero w
I am getting an error

I have checked the my code multiple times and found no indention errors.

It has probably with how you implement the code inside the compute_cost function.

Indentation errors are only the first thing to check. There are many other possible errors.

Getting the expected results when w and b are zero is fairly easy. Multiplication by zero and adding zero can hide a lot of issues.

2 Likes

It’s my bad, instead of comment I flagged your reply. Don’t know how to remove the flag! Help is needed on the un-flag.