0
Python Running Programme
Hi all, I'm new to python, I've installed python 3.8 and works in command prompt. I've written my first programme called test.py which simply prints "hello world!" to the screen. However, when I type in python3 test.py into python, it prints: File "<stdin>", line 1 python3 test.py ^ SyntaxError: invalid syntax I have tried to set the environmental variables so that it reads it from right place but not 100% sure this is correct. Any help will be appreciated!
4 Respostas
+ 1
'python' is an executable wich should be run in terminal, not in python command line...
0
Thanks! Just tried and it works, what is the purpose of having python terminal if python programmes can be run from the terminal?
0
python command line is used to run python commands line by line...
notice that to run python command line you run 'python' in terminal, and to run a python script, you run 'python filename.py' in terminal also ;)
0
(python or python3 or anything else: it mostly depends on wich versions are installed in your system ^^)