Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
def hello():
"""Print "Hello World" and return None"""
print("Hello World")

So this is the code from Python toturial and it should show me In [1]: runfile('/Users/fangohr/Desktop/hello.py', wdir=r'/Users/fangohr/Desktop')
Hello World but instead in get no Hello World message only this runfile('C:/Users/Himen/.spyder-py3/hello.py', wdir='C:/Users/Himen/.spyder-py3').

What I have tried:

Google, reddit, ocw and edx...no help my question I guess is too basic
Posted
Updated 6-Nov-18 3:55am

1 solution

Look in your folders to check exactly where you are storing the python program file, and run it from there. You can use the command line:
python C:/Users/Himen/.spyder-py3/hello.py

or load the file into the python IDE (IDLE).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900