I have troubles running the function gradient_descent() in the Week 2 practice lab, I realized that the problem is in the for, I made a for in another cell and I can’t believe it doesn’t run, what can be wrong?
The only possibility I can think of is that one of the previous cells reassigned (by mistake) the reserved keyword int with a float value. Check your earlier cells, if you did anything of that sort. Else, restart the kernel and rerun the cell.
I restarted the kernel and didn’t work, curious is that I tried on my local environment and did’t have any problem running the same code. Could it be a problem of jupyter run within Coursera?
Hello @javihm77, can you (1) restart the kernel and run all the cells in your coursera notebook, (2) after the cell that shows the error, create a new cell, within which paste and run the following commands:
print(range)
print(int)
print(int(5))
print(range(5))
print(range(int(5)))
and then (3) share a screenshot of the printing result here?
Hi @javihm77, I am closing this thread. Please open a new one if you have any follow-up.
Raymond