Introduction to Python

Python is an interpreted programming language, this means that as a programmer you write Python (.py) files in a IDE (like Spyder) or Text editor (such as Notepad++) and then put those files into the python interpreter to be executed.


As already mentioned, Python codes are written here using Spyder IDE, which is part of the open-source software platform named Anaconda. Anaconda includes Python, Spyder, IPython and various other data analysis libraries. So, I would recommend you to download Anaconda from and then install it in your MS Windows PC. Setting the value of the PATH environment variable is optional here.

I have written a small Python code named (just one of line code to print some message with print() function) in the editor of Spyder IDE. See the code here:

print("Hi from!")

After executing the program, the status of different sections of the Spyder IDE is given below.

Figure 1: How to run a Python program using Spyder


Alternatively, you can also download the Python installer from and add the installation directory to your PATH environment variable (mandatory). In this case, to check if you have python installed on a Windows PC, run the following on the command line (‘$’ indicates prompt here):

$ python --version

Now, open your command line, navigate to the directory where you saved your program, and then run on the command line:

$ python

The output would be like this:

Hi from!

Hope you are now feeling excited to run your first Python program.