I wrote a simple .py program for
def main():
print ("Hello World")
That's it. I saved it as hello.py
But when i try to run it
I get this error:
>>> hello.py
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
hello.py
NameError: name 'hello' is not defined
Please Help me. I need the power of python. This happens with every program. I can define functions in the command-line and run them fine, but I can't do advanced stuff.
Any help would be appreciated.
P.S: Even if the code is error free does not work.