I'm getting this message when I try to run the code, do you guys have the same problem?
PS C:\Users\Diego\Desktop\intro to python> python helloworld.py python : The term 'python' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + python helloworld.py + ~~~~~~ + CategoryInfo : ObjectNotFound: (python:String) , CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Hi Diego. Try 'py helloworld.py' or 'py -3 helloworld.py' not 'python helloworld.py'
thank you @patrick
I get the following error on Win 10 and OS X:
PS C:\Users\ffrei\Documents\apyth> python hello.py What's your name? Fritz Traceback (most recent call last): File "hello.py", line 1, in <module> name = input("What's your name?") File "<string>", line 1, in <module> NameError: name 'Fritz' is not defined
@diego: did you add the python folder to your PATH environmental variable?
Would I be able to add a constant and a variable in a single print statement? e.g. Print('hello' Name) //This errored out. Expected Output Hello Susan.
The internet is too slow here, so I will download it Pls.
I am getting the same error as Fritz
I found the cause for the NameError: I am using Python 2.7
raw_input is the equivalent
> python --version Python 2.7.10
Python 2 is at its end of life. Please upgrade to Python 3 as soon as possible (even right now we're at the lovely looking Python 3.8 already :))
If you cannot run 'python' (without quotes of course) it means that python isn't in your PATH
In the newest version of VSC there is a run arrow in the top right hand corner which obviously runs the code you have open.
My question is how do you suppress seeing the path of where the file and Python executable is located? Also why am I getting the % symbol? Below is an example.