C2 Week-1 Assignment : Exercise 3 Error

I get this error and I don’t know how to solve it
L = L_of_omega(omega_array[i])

{moderator edit: code removed}

Hi @Layal_Hebshi

you’re almost there, but you’re missing two required arguments which are product of company A and product of company B which are written like pA, pB respectively

let me know the progress.

1 Like

Thank you for answering , but now I got another error

{moderator edit: code removed}

NameError: name ‘np’ is not defined even though it is defined form import jax.numpy as np in the first cells

You have to run all of the cells every time you open the notebook. That’s how it imports the packages.

This line of code in your notebook is incorrect:

The current version of this notebook has three parameters there. Yours has one.

This means you are using an obsolete copy of the notebook. You need to update to the current version. You will not be able to grade your obsolete notebook - you must update to the current version.

I am curious where you obtained your copy of the notebook, because it was updated on Coursera on Sept. 7. You should have received an automatic update to the notebook.

I deleted the cell by mistake so I took this from google

I did not know how to retrieve it if you know can you kindly tell me

Getting your code from Google is a poor choice, please review the Code of Conduct.

I recommend you rename your current notebook (using the Files menu), then, update your notebook using the “Help” - “Get latest version” tool.

You will need to clear your browser cache and restart the course session.

I did use the "help " it was no use

how can I restart the session?


now, you’re good to go, but with one correction update the function parameters also, def l_of_omega_array(omega_array, pA, pB):

and also as mentor Tmosh told restart and run your code sequentially.

1 Like

Detailed instructions are here in the Resources page:

I recommend getting a new copy of the notebook, not modifying the current one. There are several changes, also involving the grader.

1 Like

Thank you.

Thank you



1 Like