I have downloaded Atom.io for window and done setup successfully, then I download the package for running codes. but the Python result always come with an error like the picture.
Can you help me on this issue? Thank you
I have downloaded Atom.io for window and done setup successfully, then I download the package for running codes. but the Python result always come with an error like the picture.
Can you help me on this issue? Thank you
Try typing in:
python myprogram.py
However, you will still receive an invalid syntax error because:
print(*hi*)
should be:
print('hi')
Also, if you want to enter the python terminal, type:
python
Then you can type these commands (i.e. print("hi")
) directly into the terminal instead of creating a .py file and running it.
One final point, I use the following instructions to add the python to PATH: how to add python to path in windows.
It looks like you're running this from powershell. You can tell it's powershell because it says "Windows Powershell" on the first line of the output. Here's what I would do if I were you:
python
and press enter.1a. Enter what you want to run in python, print('test')
for example
ctrl-z
and press enter to return to powershell.python {script}.py
If you tried the above steps and got an error to the effect of "I don't recognize python" you should ensure that python is correctly installed in your PATH.
You can follow these instructions to install python correctly.
You can check this Stack Overflow thread for more details.
However, if you just want to play around with Python in Windows:
print("Hello, world!")
and press the Enter key.My first contact with Python was IDLE and I liked it a lot. Have fun!