please how do i fix this
Traceback (most recent call
last):
please how do i fix this this Traceback (most recent call
last):
File “main.py”, line 97, in
File “main.py”, line 97, in
if _name_ ==
‘_main_’:
if _name_ ==
‘_main_’:
NameError: name ‘_name_’ is not
defined
NameError: name ‘_name_’ is not
defined
Ans:
Here, you used _(single underscore) before and after the
module name
Please use __(double underscore) before and after the
module name
For your reference please look at the below code:
main.py 1- def main(): 2 print(“hello world”) # after calling the main() function this print() statement executes 3 4- if name ‘__main_’: 5 main() # here we are calling the main() function input hello world . . .Program finished with exit code 0 Press ENTER to exit console.