Thursday, 3 October 2019

Getting Started with Python

        Python runs on almost any operating system. In many operating systems it's already installed. You can check whether Python is installed on your computer or not simply by running following command:
python --version




If python is already installed on your computer then the above command will show the version of python.

If python is not installed on your machine then you can download the latest version of python from the following link: https://www.python.org/downloads/

To edit the python code we need a text editor. We can use notepad, vi, gedit, etc. to edit python code. but I recommend using editors like VS Code, Atom, Notepad++, etc, as they offer facilities like IntelliSense code completion and debugging, syntax highlighting, auto-indentation, and much more.

Python code file has a .py extension. To execute our program we need to follow the following command:
  1. Open text editor and write following statement in it, and save as firstprogram.py
  2. To run the source code file follow the following command: