Found error in Programming assignment

Coursera week 2/module: Python basics with numpy
I found the np importing error in every program only first three run and show the output, here’s no option for “np” Import. Im attaching the error Image, please help me to fix this issue.

  • coursera-platform
  • dl-ai-learning-platform

Hi @nomanai ,

This lab assignment is designed to help you familiar with basic python and numpy. The import statement is added at section where it is needed, this is different from the traditional convention of having all the import statement at the top of your notebook.

You should find the statement:
import numpy as np
in the section after basic sigmoid function

To ensure your execution environment is up-to-date, make sure to run code cell from start especially if the kernel has been idle for awhile or you have just log back to your account to resume your work.

2 Likes

You only need to import any asset once. It’s done in the first cell in the notebook.

Note that every time you open a notebook, you must run all of the cells starting from the top.

The Jupyter notebook editor saves your changes to the ipynb file, but it does not save the state of your workspace. So you have to re-create the workspace every time you open a notebook.

1 Like