Week 2 Python basics with Numpy

In the exercise, while running the basic_sigmoid_test, i get the following error

NameError Traceback (most recent call last)
in
----> 1 print("basic_sigmoid(1) = " + str(basic_sigmoid(1)))
2
3 basic_sigmoid_test(basic_sigmoid)

NameError: name ‘basic_sigmoid’ is not defined

I haven’t changed anything in the code except defining the string. Ideally this code should not throw an error since ‘basic_sigmoid’ is only the method name. Can someone please help me on this

Every time you open a notebook, you have to run all of the cells starting from the top.

For this you can use the “Cell → Run all” menu.

Or to run the cells individually and in sequence, click in the first cell and use the “Run” button in the toolbar. The “Run” button runs the current cell and selects the next cell in sequence.

1 Like

@TMosh is right! You should probably run the basic_sigmoid function again.

Thanks. Selecting the cells individually worked