Hello Sam,
The below code was given
You need to return this variable correctly
total_cost = 0
But first you need to write
Variable to keep track of sum of cost from each example
So here initial cost should be 0
Then under the loop over training examples where first you will predict the f_wb for ith example and then cost gets associated with the ith example.
after this the initial cost which you created for each example needs to be added to the sum of cost for each example.All these under the loop
At the end total cost is calculated using the cost sum you calculated from the above codes which is outside the loop.
Regards
DP