Python Part 1 – Using the Python Interpreter

So you are ready to dive into the world of Python, exciting!

If you are running Linux like me you should already have Python installed. You can check this by opening a terminal and typing:

python3

You should hopefully see text similar to the image below confirming that you indeed do have Python installed on your machine. If not you can check out some installation help here or alternatively install Microsoft Visual Studio Code (VSC). In VSC once you open a new python type file it will prompt you to install the required packages if these are not detected on your machine. Click yes and install and you can confirm that this was successful by repeating the first instruction above.

You can make a comment in Python by starting a sentence with the hash, #. Anything written after this # will be ignored by the Python interpreter. Commands on the following lines will be executed though, like the print command shown below:

#This is a comment

print(“And this is not a comment”)

Also, to clear the terminal of any output you can press ctrl + L.

And to exit the Python interpreter altogether type:

exit()

To find more hints and guides with Python you can search for part 2 on the site.

1 thought on “Python Part 1 – Using the Python Interpreter”

Leave a Comment