-1

I have just started learning python and make a python file called "helloworld.py" and store it inside a file called "python py" on the desktop, but this keep poping out whenever I am trying to open it in command line like this:

Can someone tell me what's wrong?

Mad Physicist
  • 107,652
  • 25
  • 181
  • 264
Max Ning
  • 1
  • 1

1 Answers1

0

You are in a python shell (we can see that from >>>). Try starting cmd.exe and then run your same command:

python helloworld.py

(from the same path as the helloworld.py file).

When you run Python.exe (as you did), you can not run scripts. This is just for running commands "live". In your shell, try for example print(1). It should work.

PascalVKooten
  • 20,643
  • 17
  • 103
  • 160