Error mentions in running cost-lab function

I constantly get the below error but can not find the solution to the problem.

I get the same error in the optional lab as i run through the cost function and wonder if it is a bug?

NameError Traceback (most recent call last)
in
----> 1 plt_100(x_y)

NameError: name ‘plt_100’ is not defined

Is this a bug or another error

Hope some one can help me out

This error means that you have not defined this plt_100 function or maybe you are not running the cell containing it.

Hi Gent,
Thanks for your replay. I think i have to reformulate my question little.
I have no prior coding experience in Python this however was in the prior lab exercise no problem. I could press the run button and than read the code or outcome. In the current cost function excersise when i press the run button i get the above mentioned error. However there is no manual or hint included to learn about the error. So how can i learn from this error and find out what to do, to prevent it ?
Hope this is a better formulated question
kind regards
Richard

Yes I understand Richard and what I wrote above is the meaning of the error. Simply the error means that this function ie. Plt_100 is not found in the session you are running, for the reasons I mentioned.

Perhaps you should take a few python classes as a first step.

@Richard_Huijsmans,
I’m not clear what is trying to call plt_100. Is this in code you wrote? You mention you’re seeing it in an optional lab as well - so that sounds like it’s not in your code.

Are you running in your own environment? If so, can you try running in the Coursera environment?

Can you share more info about where you are seeing this issue? Which lab(s), and which cell in those labs. And also share a screenshot of the full error stack trace you’re seeing.

Hi Wendy,
thanks for your question. Note believe his plt_100 command is the first assignment
were you have to program in Python where as in the previous ones you only had to ckick the run button ( I usue the coursera environment).
If you have no prior python experience and because there are no hints in the assignment to help you further this is still a problem for me.
Theoretically i think that the ppt_100 is supposed to train the cost function and find an optimum based on a b value of 100.
Below i give the printssceen of the error so maybe you can explain where i can find an example code in order to complete the assignment.


This is more readable code

Thanks, @Richard_Huijsmans
I’m not noticing any labs with plt_100 in them. Let’s focus on the one you’re having trouble with. Which lab is the screenshot from? And what section is error happening in?

Hi Wendy, I have solved the issue of the ppt_100 issue. I was only able to solve this with an python instructor. Unfortunatly he was also not sure why put_100 was displayed in cell. I followed Gents suggestion and found a private Python course instructor. We found that using the below command provided a better solution however not perfect.


Unfortunatly i now have another issue. I can not upload my regression assignment. I got the following error mention:

Maybe you understand what this error code implies. As far as i can see is the written code correct.

I got this same thing on the final examine and it took me 5 hours… said can’t compile students code but mine was cell #20.

Customer service chat agents didn’t know what to do about it. This is really disappointing

Hi Blade,

I have solved my issue ! I had created an additional cell with a code similar to the provided code. This additional code i wrote was not included in the evaluation template of causer course. So the standard answer was “can’t compile studends code in cell #4”.
What i learned from this experience is the following. Do not experiment to much with the code but if you do, delete the cell after you have experimented with it.
The answer template created in the background to asses your assignment has no alternative answer possibilities included. As a consequence the system gives the following answer. Can’t compile students code…etc.
Chat agents or custumor service should be able to solve this type of issues from the manual because it is a very common “mistake” .
Even better i think the software engineers should provide an additional text line acompanying the error code with an explanation of the error cause. This way students can correct it very easily themseleves and in a short amount of time :grinning:

@BladeBoques,
Have you figured out your issue? One suggestion for debugging this kind of error is to see if you can reproduce it in the notebook.
First, to figure out which cell is cell #20, open your notebook on coursera, in the menu bar, click “Kernel” > “Restart & run all”. Then the kernel will restart and your code cells will be run one by one. As the cells finished running, a number will show on the left-hand-side like this: In: [20] indicating a cell number.

You don’t mention the full error you’re seeing from the autograder, but generally the format is “Cell #. Can’t compile the student’s code. ”

Look at cell #20 in your notebook and see if you can figure out what is causing the issue described in .