Introduction to Python
Python is a very popular programming language which was created by Guido van Rossum and it was released in 1991.
Key features
- Popular for web development(server-side)
- Interacts with databases and file systems efficiently.
- Used for rapid proto-typing.
- Can handle very large volumes of data and even handles very complex mathematic operations.
- supports OOPs concepts.
- Quite interactive as it runs on interpreter
- very simple syntax, feels just like english language.
- runs on almost all platforms.
Why you should learn Python
- Python is the preferred language for most data scientists because of it's powerful capabilities.
- Biggest advantage is that it's an opensource and easy to learn programming language.
- Since it's cross-platform language, it is used over variety of platforms for almost 30 years.
- Highly flexible and versatile language.
- Python grabbed more demand in the market and hence python developers are offered with high salaries.
- Recommended language for Artificial intelligence as it is recommended for image recognition and machine learning.
- Used for web development.
- It acts as a testing framework for validating the products with established enterprises.
Why Python is so popular?
No one can deny the fact that Python is one of the most widely used programming languages.
- Python is highly productive and capable of performing highly complex tasks.
- It's a very expressive language and much more concise and requires less time, effort, and fewer lines of code to perform the same operations when compared to other programming languages like C++, java etc
- Python offers rich set of libraries and frameworks.
- Large community support.
- Though it is not recommended for speed-intensive applications like games etc, it is a super cool language to use for web development, machine learning, artificial intelligence related applications, data science, testing etc.
- Very big companies like Google, Youtube, Yahoo, IBM, Instagram, Pinterest, Quora, Uber, Dropbox and many other companies are using Python.
Installation
1. On Windows
- Go to Python downloads
- Download the latest version and extract the files.
- Run the python*.msi file and follow the instructions of the setup to install.
2. On Linux or Unix
- check if you already have python on your machine
$ python --version
- Using apt-get
$ sudo apt-get update
$ sudo apt-get install python3.6
- Using yum
sudo yum install python36
3. Using OneCompiler
- You don't need to install any software.
- Just goto OneCompiler and choose the programming language as
Python
and enjoy programming without any installation.
Simple Python Program
You can either use text editor or any IDE to write python(.py) programs after installing python. Or Simply open your browser and open Onecompiler
sample code of happylearning.py file
print("Hello, Happy learning!!")
How to run your program
- Go to Command prompt and run the below command
python happylearning.py
Note:
Indentation is important in python as it represents the blocks of code.