MLS Course 1 Week 3 Exercise 4

I am lost on the PREDICT exercise 4. I just cannot understand the hints and keep getting errors. I am with 66% and about to FAIL as even Exercise 6 has lost me. Perhaps someone can help me understand the PREDICT exercise and the Hints?

At the very last line of code in your image, I can see that the “for i in range(m)” statement is not indented - it starts in column 1.

That’s a problem.

That puts it outside the scope of the compute_cost() function.

Python is extremely strict about the use of indentation - that is how it defines blocks of code.