Hello, hope the community can help me solve this problem that I get stuck at. I’ve tried different ways to complete the week 2 assignment and submit the code, but it always shows the error about the line of code after each section to say: name ‘basic_sigmoid_test’ is not defined. The name within ‘’ is different for each question/answer. Since this line is in the template, I am not able to edit or delete through my keyboard. Looks like it is calling the function without any input parameter. Anyone ran into the same problem?
An example:
GRADED FUNCTION: basic_sigmoid
import math
def basic_sigmoid(x):
“”"
Compute sigmoid of x.
Arguments:
x -- A scalar
Return:
s -- sigmoid(x)
"""
# (≈ 1 line of code)
# s =
# YOUR CODE STARTS HERE
s = 1 / (1 + math.exp(-x))
# YOUR CODE ENDS HERE
return s
print("basic_sigmoid(1) = " + str(basic_sigmoid(1)))
basic_sigmoid_test(basic_sigmoid) ---------> This is the template code triggers error
Error code:
basic_sigmoid(1) = 0.7310585786300049
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_test’ is not defined