Can't open Python file in terminal

Hello, can you help please?
I’m trying to open a python file on the command line, but it gives me the number 2. Python itself opens if I enter the command python3 and the location in the terminal in the correct folder.

in the terminal it looks like this:

python3 myFirstPythonFile.py
2

python does not open when running this command

did everything as described here
https://www.codecademy.com/journeys/computer-science/paths/cscj-22-intro-to-programming/tracks/cscj-22-programming-in-python-on-your-computer/modules/cscj-22-python-on-your-computer/articles/installing-python-using-a-text-editor-and-running-your-program

Hi! I hope you already found the solution.

But if you did everything you found on that site, chances are that is all fine.

2 is the result of the python code provided in that page, which is:

print(1 + 1)

Which would mean it is running good.
Hope that helps.

1 Like

Hello!
Yes, I already realized this when I started another exercise :smiley:
But thanks a lot anyway!

1 Like