Week 3 assignment problem

I have 4 suggestions for you.

  1. Download a fresh copy of the assignment, because from your screenshot, you have modified codes you are not supposed to. In each assignment, there are exercises and you only need to add codes in between this line ### START CODE HERE ### and this line ### END SOLUTION ###, and modify nothing else. To download a new copy, follow these instructions which will ask you to rename your current notebook before the system can get you a new copy. After this, you can copy your work from the original notebook to the exercise cells and in between the two lines mentioned above. Change nothing else. With this, I hope you can have a better and more solid notebook to continue your work.

  2. Understand how jupyter notebook works on coursera. Everytime you reopen the notebook, you need to re-run all the code cells from the very first one. If you do not re-run them, you will see the name XXX is not defined error which you shared in your first post of this thread.

  3. Read the error message and debug. The error messages you shared are actually quite easy to understand, and should give you the direction for you to start debugging. it is really not nothing.

  4. Learn Python first if you think writing code, understanding code, or debugging code is challenging. I suggest you to spend a few minutes to read this post on where you can start learning Python.

Lastly, it takes time to learn Python, to learn using jupyter notebook, and to debug your code, but this is a process each learner has to go through themselves.

Raymond