I was thinking maybe it’s due to me downloading python again when it was already installed, if it even was? So it is as if you run python and entering the codes you wrote inside hello.py into the python interpreter. What python hello.py does (if you were to run it in your terminal instead) is to execute the python interpreter, supplying your hello.py file as the code for the interpreter to interpret and execute. I suspect when you are running the command python hello.py, you were still inside the python interpreter program, which is why it return the InvalidSyntax error, because it is not a valid python syntax. However, all I keep getting is : Synta圎rror: Invalid Syntax Which was supposed to return: Hello World Then, it said to type in: python hello.py That is actually the python interpreter’s command line. # Bunch of text describing your python version and other things
0 Comments
Leave a Reply. |