Course 1 week 3 course issue

When creating a post, please add:

  • Week 3
  • Week 3 Practice lab assignment
    Cell #17. Can’t compile the student’s code. Error: TypeError(‘compute_cost() takes 4 positional arguments but 5 were given’)

This error is being generated for a sample code that I have no way of editing. How do I correct a code which I can’t edit

@singhsimu1991 based on the error call you are providing compute_cost() with one too many variables… (Here it says you are giving it five items-- it expects only four).

So your issue isn’t likely with the test code (which you can’t edit)-- rather with your function just before calling it.


That’s because that cell has code that is testing one of the functions you wrote. There is an error in your code in that function.

The notebooks lock the test cells so that you cannot modify the test conditions.