2.1 Programming and Python

2.1.1 Programming = Giving Instructions

Recall when you used a calculator to add the two numbers 1 and 3. For this, you need to communicate your desire to the calculator by pressing the buttons 1, + and 3. Programming in any language is similar. The programming language (e.g. Python, R, C++) takes the role of the buttons of the calculator and allows us to ‘speak’ to the ‘brain’ (like the core of the calculator) to do the work we want to be done.

Moral: Programming is the same as giving instructions.

2.1.2 What is Python?

Python is known for its (almost English like) readability. For example print('Hello') will show Hello on the screen. These make it easier for everyone to harness the power of programming3.

The ‘brain’ of Python that does all the hard work is called the interpreter. In spite of its power, an interpreter can only process one instruction at a time4. The latest version of the Python interpreter is ’Python 3’.


  1. If you go back to the examples of the calculator, Python takes the place of the buttons.

  2. This is different from a compiled language (such as C, C++, Fortran) that ‘analyses’ all the code before execution.