I have this in my python file (called myLib.py)
def add(x, y):
return x + y
and in my jupeter notebook I have this code:
import myLib as myLib
y=myLib.add(1,2)
print(y)
when I run the jupyter cell,I m getting this error:
AttributeError Traceback (most recent call last)
<ipython-input-10-9b942a9ce18f> in <module>
1 import myLib as myLib
----> 2 y=myLib.add(1,2)
3 print(y)
AttributeError: module 'myLib' has no attribute 'add'
I am using visual studio
What is the problem and how I can fix it?