W2_A2_ graded function model error

It looks like you must have deleted the code cell containing the model function, which is why you get the first error. You might want to get a fresh clean copy of the notebook and then copy over your previous work. There is a topic about how to do that on the DLS FAQ Thread.

For the second error, please realize that just typing new code in a function cell and then calling it again does nothing: it just runs the old code. You need to click “Shift-Enter” on the actual changed function in order to get the new code interpreted into the runtime image. Now that you realize this is how it works, you can easily demonstrate the effect to yourself.