Python is an interpreted (not compiled), high level and general purpose programming language. Python supports both Object oriented and Structured programming models.
Python is the world's most popular programming language in 2020. Probably this would continue to be the same for another decade or so.
Before we start on with Python, There are some basic questions that comes to most of our mind.
- Why should we learn Python?
- What makes Python different from other Programming Languages?
- Why is it so popular?
Probably it's the same answer for all these questions. Let's see what makes Python so special.
- High level programming language with simple syntax and easy to read, write and learn. This would result in Increased Productivity.
- Python is an interpreted language and executes the code line by line in run time. This makes it easier to analyze and debug in case of any errors.
- Python has huge standard library, this makes it easier for development to pick the required function rather than having to develop it.
- Dynamically typed, Python automatically assigns the data type to a variable in the run time based on the value being assigned.
- Independent of Platform, Python code can run on different Operating Systems like Windows, Mac and Linux.
So, what do we need to get started with python?
- Text Editor/IDE
Some of the computers may already have python installed already. To check the version of python installed, run the below command in Command Line (or Terminal on Mac).
Command 'python' by default look for python2. In the above screenshot, highlighted is the python version installed (Python 2.7.16).
To check if Python 3 is installed, run below command in the terminal.
Let's print "Hello World" from terminal.
print("Hello World, My First Python Statement")
Program is a set of executable statements and we can't always run them from command line.
There are various Text Editors and IDEs which are tailored to work with Python script. These would make working with python much easier.
I prefer to use 'PyCharm' and there are many other IDEs.
Now, let's create a python script main.py with 'print' statement and run.
If you have any suggestions or comments, Please leave a comment or email me using the Contact form.