01 Getting the PC Ready for Python Programming | Learn Python like ABC

A complete Python tutorial for anyone who doesn't know anything about programming.

01 Getting the PC Ready for Python Programming | Learn Python like ABC

Tools Needed on the PC to get Started

Just as we have word documents, pdfs, spreadsheets, and other types of files, we can also have a file that will contain the code that we write.

By "code", I mean the instructions that we want to give the computer.

This file that contains the code is sometimes referred to as a script file. Mostly, the name "script file" is used to refer to a MATLAB file. Don't worry if you don't know what MATLAB is.

For python, we mostly just call them "python files". The file extension is .py (example filename.py). We will work with this throughout the series so you'll definitely get conversant with it.

the extension of a file is an identifier attached to the filename. It starts from a period(.) and it's usually of few letters. For example: word documents filenames end with a .docx and text files end with a .txt. Other extensions include .pdf, .exe, .rar, .zip, etc

Okay, we have these python files. Now we have to find a way of editing them; putting the instructions in them.

If you're on a Windows machine, you could think of using notepad to write the code and save the file with the right extension. Absolutely fine.

But we have software specifically designed for writing codes. These are called IDEs and Text Editors.

IDE stands for Integrated Development Environment. They have more features as compared to the text editors.

In this series, we'll be using a text editor called atom.

Let me show you how you can get Atom installed on your machine.

Getting Atom on the PC

We start by going to Atom's official website (www.atom.io). I always prefer to download from the official websites.

The website should look like this: atom website.png Go ahead and click on the download button to get the atom package downloaded onto your PC.

The installation process is pretty straightforward. Open the installer and follow the necessary instructions to get Atom installed on your PC. Screenshot (63).png After the installation, the interface should look similar to this:

Screenshot (64).png

And that's it! We've got a text editor installed.

Note: You can actually decide to use your preferred editor/IDE. Apart from Atom, there are others such as Visual Studio Code (vs code), Sublime, PyCharm, etc.

Getting Python Installed

Okay, so we've now got our IDE/text editor set up. But we're not quite ready to start our journey yet.

What we need to do now is to help our computer understand the python language. Think of it as we're going to teach our computer Python. We do that by simply installing the python interpreter onto the computer.

There are two versions of the python interpreter: there's python 2 and there is python 3. Python 2 is an older version but it is still sometimes used depending on what is being built.

In this series, we're going to be working with python 3, and here's how we get it installed.

  1. Visit Python's official website (www.python.org).
  2. Navigate to the downloads page and download the latest version of python 3. Screenshot (66).png
  3. Installation: Open up the installer and follow the installation process. It is also quite simple but the most important part for us to consider is this one: Make sure to check the box at the bottom that says "Add Python 3.x to PATH". Annotation 2021-12-27 122418.jpg This is very important. Adding it to PATH allows us to use the command "python" in our command prompt (or terminal on macOS and Linux).
  4. Check if python is really installed: We now go into our CMD (Command Prompt) or terminal and type in the command python --version. You might need to hit the Enter key after entering the command. Screenshot (68).png The python --version command basically displays the python version that you're using. As you can see from the picture, my version of python is 3.8.11
  5. Are you having trouble finding the CMD on a windows machine? Open up your start menu and search for CMD as shown in the picture below. On a macOS or Linux, search for "terminal". Screenshot (67).png

NOTE: On a macOS or Linux, you might need to type in the command, specifying the particular version of python you want to use (2 or 3).

Like this: python3 --version.

This is because macOS and Linux both come with a python2 version already installed. If you're having other problems relating to getting python installed, please leave that in the comment section. I'll have a look at it and help out.

Video Version


That's it

Yep, we're done with this one.

If you like this content and would like to support it, you can do that by simply leaving a LIKE behind.

If you want to become my friend, connect with me on Twitter. The handle is trevenue44.

A video version of this series is on my YouTube channel. Check that out: trevenue44 on YouTube.

I'll see you soon.