stuck with assignment problem name error found please help assignment
Hi!
Can you rerun all the code cells from the beginning?
This can be necessary after leaving the page and coming back. This is because the notebook is shutdown and then restarted after returning.
I have did this but nothing happened
no one is helping please help me to solve the assignment
I would have made the same suggestion as Sam did for the error you shared here. I have two yes/no questions for you:
-
Go to the notebook, can you see this code cell under section 1, including these import lines?
-
On the jupyter notebook menu bar, click โKernelโ > โRestart and run allโ, my question is, do you see the same error?
Raymond
I canโt understand anything very tough
I have 4 suggestions for you.
-
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. -
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. -
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.
-
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
i am stuck with it now please help
Hi, you need to indent your code correctly. I suggest you to spend a few minutes to read this post, and make changes to your code for indentation. Also, you have 3 code lines starting with z_wb
, and I suppose the first one is not intended to be there and please remove it.
Raymond
PS: we canโt share assignment code here, so I am removing it.
now this problem are showing please help very hard i have run the previous shells but nothing happened
please help ayone i am stuck with it for whole day
Hi,
The code in your function is not indented correctly.
I will also suggest the W3Schools tutorial for getting familiar with Python as a programming language.
how to fix it it? what to do now?
i have done the code as instructed
Hello there,
your code is not indented correctly, search google for indenting python and try to learn a little bit about it, your code is technically right, but itโs outside the function:
if you want to indent something inside this function:
<\tab> then
<\tab> it
<\tab> must
<\tab> be
<\tab> indented
<\tab> correctly (using tab)
return: got it?
please help anyone no one is helping
People are trying to help, but the way you ask for help isnโt very politeโฆ
You are having trouble cause you are not implementing the function correctly. I am happy that you indented the function correctly.
Now for you issue:
Take a look on the description of the exercise, itโs very well explained:
Total Costโ> ๐ฝ(๐ฐ,๐)=1๐โ๐=0๐โ1[๐๐๐ ๐ (๐๐ฐ,๐(๐ฑ(๐)),๐ฆ(๐))
Check the indexes, Andrew Ng explained it very well, here you just need the index from the train data (i) you still donโt need j.
for i in range(m):
<\tab>z_wb = np.dot(w , X[i]) + b
<\tab>f_wb = sigmoid (z_wb)
โฆ the rest should be right.
How about that?
For the future, write you question clearly, instead of writing help,pls help, help.
Try:
My values of total cost
are not matching with the expected , could anyone please check my code and evaluate what Iโm doing wrong?