Jun-26-2017, 04:07 PM
(This post was last modified: Jun-26-2017, 04:07 PM by sparkz_alot.)
You are mixing things up. To run your program you basically have two choices:
1) You need to navigate to the directory containing you file. then type the entire file name including the ".py"
For example
Notice your prompt is "PS C:\"
To use python in interactive mode, type "python" (if you have one version of python installed)
For example:
To exit this mode and return to the command prompt, type "exit()" then Enter
1) You need to navigate to the directory containing you file. then type the entire file name including the ".py"
For example
PS C:\Users\sparkz> cd c:\python PS C:\python>ex1.py2) In file explorer, navigate to your file and double-click it.
Notice your prompt is "PS C:\"
To use python in interactive mode, type "python" (if you have one version of python installed)
For example:
PS C:\> python Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>Notice in this mode, your prompt is now ">>>"
To exit this mode and return to the command prompt, type "exit()" then Enter
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition