Cell #UNQ_C1. Can’t compile the student’s code. Error: SyntaxError(‘invalid syntax’, (‘/tmp/student_solution_cells/cell_7.py’, 43, 15, ’ f_wb = \n’)
@Georgiana90 sounds like your Python is not properly formatted. First thing I’d check is make sure you have you tab spacing correct.
First verify that all of the tests in the notebook pass or give the expected results.
Restart the kernel and clear all the output, then use Cell → Run All.
Then carefully check every result.
I guess so … and I have the same problem with the third assignment… cause if I don’t pass I won’t get the certificate right?
Can you explain more detailed please ?
@Georgiana90,
The error says ‘g’ is not defined. Make sure the code you define in the section between ### START CODE HERE ### and ### END SOLUTION ### sets the value ‘g’, like this:
g = < your code here >
@Georgiana90, do you have much Python programming experience? It might be helpful to attend a tutorial course on Python.
That will help you know how functions are used, so you can understand the error about “name ‘g’ is not defined”.
Thank you … I did and it worked
I’m stacked on other exercise . I don’t really get where the error is
Hi @Georgiana90 ,
It looks like this is a code cell for testing your compute_gradient() function. The error message raised is because the variable ‘n’ passed to np.zeros() is not defined or set. As I don’t have access to this lab, I can only make the following suggestions to move forward:
-
‘n’ is set in some code cells in the lab assignment - in that case, you need to rerun all the cells and refresh the execution environment, so that the value of n is pickup. You can do this from the menu bar at the top of your notebook by clicking:
- kernel ->restart & clear all output
- cell → run all above (from your current cell)
- run current cell
-
your current cell has been corrupted, hence the variable ‘n’ is not set/defined. In this case you need to get a fresh copy of the lab. You can do that by clicking the ‘?’ icon at the top right of your Coursera window.
Also, remember to rerun your code when you pick up your work again after it has been idle for awhile.
@Georgiana90:
Note that to get a new copy of a notebook, you first must rename or delete your old notebook.
The “Get latest version” tool will only replace missing files. it will not give you a new notebook if you already have one by the same name.
Use the “File->Open” menu to select a file and delete or rename it.
Oh yes . I did that and worked well . But only on first one … I don’t think I will ever be able to get done my assignment:(
Your codes might be written correctly but the error is stating issue with your code implementation.
if you notice your error for the first time codes gives an error is because rather than getting a value for dj_db, you are getting dj_db, pointing you to check your value with dj_dw[j] code being correctly writting.
Please click on my name, and then message the screenshot of the grade cell in question.
You will finish your assignment, don’t worry about that, it’s just the matter of time, and learning something more.
Regards
DP
I finish it today… thank you all xx
I think I delete something . I cannot open assignments 2 anymore .
I think I delete something from here
click and then reboot, and then update lab, you will get the files