I created two files in python First one is mym.py
def hello():
print("Hello everyone")
return
def summ(x,y):
total=x+y
return total
and next one is abc.py
import mym
hello()
x=summ(3,4)
print(x)
And the error msg which I am getting is...both the files are in same working directory and there is no error of module not found...its giving error of function not defined.
Traceback (most recent call last):
File "C:/Users/Nisha/AppData/Local/Programs/Python/Python39/abc.py", line 3, in <module>
hello()
NameError: name 'hello' is not defined
Traceback (most recent call last):
File "C:/Users/Nisha/AppData/Local/Programs/Python/Python39/abc.py", line 3, in <module>
x=summ(3,4)
NameError: name 'summ' is not defined
What is the problem in function definition I am unable to trace...
mym.summ