Hello All,
I’m trying to learn some coding skills to help out with my job so I’m going through a course. However, when I try to run the simple print(‘Hello World’) scripted through the cmd I get the following error. I have already tried adding to the path and C:/Windows/system 32/ python --version and get the correct version as the output. Not sure where to go from here.
Input through cmd:
C:\(file path)\python hello.py
Output:
File "C:\(file path)\hello.py", line 1
Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] on win32 ^^^^
SyntaxError: invalid syntax
Code hello.py:
#Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] on win32
#Type "help", "copyright", "credits" or "license()" for more information.
print("Hello World")