Python Get Stated

Even before we deep dive into how to setup your own machine so that you can be able to run Python code it, you need to check where it has python on it if not then you have to install it.

Install Python

As I mentioned many machine eaither Windows or Mac might have Python installed on them.

To check if you have Python Installed on your Windows PC machine just click on Start Menu then search for Command Prompt (CMD) then paste the below command and then click enter

C:\Users\Your Name>python --version

To check if you have Python Installed on your Linux machine just search for Command Line or on Mac search for Terminal then paste the below command and then click enter

python --version

If the Python was installed you will get something like the below output:

C:\Users\Your Name>python --version
python 3.13.2

But if you don't have Python installed on your machine you can download and install it for free from their official website https://www.python.org/downloads/

After you have downloaded and installed it, check again by running the above command if it shows then you are good to go, if not then at most cases you need to add the path to the environment viriables by following these steps

  • Open your local disk.
  • Check if there is folder called Python, click on it, if not click on Program Files
  • Find the Python Folder and Click on it, when it open you will see bin folder
  • Copy the address of that folder.
  • Search for "environment viriables" on start menu of your computer and click on it
  • Then click on the "environment variables" button
  • Then click on the "path" button and click on the "new" button and paste the address of the "bin" folder that you copied earlier and click on the "ok"

Now check you machine to see if the Python is installed on it by running the above command.

Or if you found it so difficult don't worry we got you cover, you can watch our tutorial on how to download and install it here:

Python Quickstart

As you know we have thousands of Text Editors available in the market both commecial and free, but here are some of the most popular ones that you can use to run your Python code.

Visual Studio is a powerful IDE that can be used to write Python code. The community edition is free and includes many features. to used it you just need to add the langugage extention.

Eclipse is a free IDE that can be used to write Python code. It is very powerful and can be used to develop complex applications.

PyCharm is a powerful IDE that can be used to write Python code. The community edition is free and includes many features.

IntelliJ IDEA is a powerful IDE that can be used to write Python code. The community edition is free and includes many features.

Atom is a free IDE that can be used to write Python code. It is very powerful and can be used to develop complex applications.

Sublime Text is a free IDE that can be used to write Python code. It is very powerful and can be used to develop complex applications.

Notepad++ is a free IDE that can be used to write Python code. It is very powerful and can be used to develop complex applications.

Jupyter Notebook is a free IDE that can be used to write Python code. It is very powerful and can be used to develop complex applications.

Spyder is a free IDE that can be used to write Python code. It is very powerful and can be used to develop complex applications.

Thonny is a free IDE that can be used to write Python code. It is very powerful and can be used to develop complex applications.

IDLE is a free IDE that can be used to write Python code. It is very powerful and can be used to develop complex applications.

PyDev is a free IDE that can be used to write Python code. It is very powerful and can be used to develop complex applications.

Wing IDE is a free IDE that can be used to write Python code. It is very powerful and can be used to develop complex applications.

Komodo IDE is a free IDE that can be used to write Python code. It is very powerful and can be used to develop complex applications.

Bluefish is a free IDE that can be used to write Python code. It is very powerful and can be used to develop complex applications.

Geany is a free IDE that can be used to write Python code. It is very powerful and can be used to develop complex applications.

For beginners, the best IDE is Visual Studio Code because it is very simple and easy to use. It is also free and includes many features that will help you write, compile, test and debug your Python code.

The below are steps on how to start working with VS Code as it is simplarity and very light weight to start with.

Step 1. Choose an IDE.

As mentioned elier we will be using VS Code as our choice.

When you open it we have to Install a "Python extension" on "VS Code" to enable you to write, compile, test and debug Python code. You can install the C++ extension by following the steps below: Open VS Code, click on the 4 squares icon on the left side bar, then click on the search icon and type "Python extention" and click on the install button. VS Code Python Extention

Step 2. Create a Repository or Folder.

Before starting writing code you have to create a folder where your file will going to be store in order to avoid combining your file with unwanted files. name your folder with anything you want for better identification, but for the sake of naming convention make sure to named it with useful name: like my Python code or Python Practical or something very useful.

Step 3. Open your chosen IDE (VS Codee).

Launch the IDE that you have chosen to use for compiling your code and locate the folder you have created, or right click on the folder and click on "open with".

Step 4. Create and Save Python file.

Now that you have open the folder you created on your choosen IDE, to create a file move the cursor to the editor menu and click on file then new text file

After clicking "new file" the it will ask you to name it then you can name it with anything you want but must end with the extension of .py that is the only way the text editor will understand that you are going to write Python code.

Step 5. Write your Python code

Type or copy and paste the below Python code into the file you have created. You can use the below code to test your environment.

print("Hello, World!")

After you have written your code, you can save it by clicking on the file menu and click on the save button or you can use the shortcut key Ctrl + S to save the file.

Step 6. Run your code

If you want to run the code you can open the "VS Code" Terminal by click on then three dots "..." at the top right hand side of the Editor, then "Terminal" and click on "New Terminal".

Or in short you can use the shortcut key Ctrl + Shift + 'to open the terminal.

When it Open then Run the below command:

C:\Users\Your Name>python helloworld.py

If everything goes well the output should be like the below:

Hello, World!

Kudos, you have written and executed your first Python program.

Codingkolejis' Python Editor

If you find it difficult, we have an Online Python Editor, where you can write and run your Python code and see the result right there.

print("Hello, World!")

Because this editor will be used in our entire tutorial, to show the concept of Python.