What is Python Programming language | Applications | Features | Part-1

                            
What is Python Programming and its applications

   Introduction

  • Python is a general-purpose high-level programming language.
  • Python was developed by Guido Van Rossum in 1989 while working at National Research Institute in the Netherlands.
  • But officially Python was made available to the public in 1991. The official date of Birth for Python is Feb 20th, 1991.
  • Python is recommended as a first programming language for beginners.
  • As of January 2021, Python ranks third in TIOBE’s index of most popular programming languages, behind C and Java.

Eg1: To print Helloworld

Java: 

  1. public class Main
  2. {
  3. public static void main(String[] args) {
  4. System.out.println("Hello World");
  5. }
  6. }

C: 

  1. #include<stdio.h> 
  2. void main() 
  3. printf("Hello world"); 

Python: 

  1. print ('Hello World')

Eg2: To print the sum of 2 numbers

Java: 

  1. public class AddTwoNumbers
  2.    public static void main(String[] args) 
  3. {
  4.      int a,b,sum; 
  5.      a=10; 
  6.      b=20; 
  7.      sum=a+b;
  8.      System.out.println("The Sum:"+sum); 
  9. }

C: 

  1. #include <stdio.h> 
  2. void main() 
  3. int a,b; 
  4. a =10; 
  5. b=20; 
  6. printf("The Sum:%d",(a+b)); 

Python: 

  1. num1 = 15
  2. num2 = 12
  3. sum = num1 + num2 
  4. print("Sum of {0} and {1} is {2}" .format(num1, num2, sum)) 

  • The name Python was selected from the TV Show "The Complete Monty Python's Circus", which was broadcasted on BBC from 1969 to 1974.
  • Guido developed Python language by taking almost all programming features from different languages
  • 1. Functional Programming Features from C 
  • 2. Object-Oriented Programming Features from C++ 
  • 3. Scripting Language Features from Perl and Shell Script 
  • 4. Modular Programming Features from Modula-3
  • Most of the syntax in Python Derived from C and ABC languages. 

Where we can use Python: 

We can use it everywhere. The most common important application areas are
1) For developing Desktop Applications 
2) For developing web Applications 
3) For developing database Applications
4) For Network Programming 
5) For developing games 
6) For Data Analysis Applications 
7) For Machine Learning 
8) For developing Artificial Intelligence Applications 
9) For IoT

Note: 
  • Internally Google and Youtube use Python coding. 
  • NASA and Network Stock Exchange Applications developed by Python. 
  • Top Software companies like Google, Microsoft, IBM, Yahoo using Python.

Features of Python:

1) Simple and easy to learn: 

  • Python is a simple programming language. When we read Python program, we can feel like reading english statements.
  • The syntaxes are very simple and only 30+ kerywords are available.
  • When compared with other languages, we can write programs with very less number of lines. Hence more readability and simplicity. 
  • We can reduce development and cost of the project.

2) Freeware and Open Source: 

  • We can use Python software without any license and it is freeware. 
  • Its source code is open so that we can customize based on our requirement. 
  • Eg: Jython is a customized version of Python to work with Java Applications.

3) High-Level Programming language: 

  • Python is a high-level programming language and hence it is a programmer-friendly language.
  • Being a programmer we are not required to concentrate low level activities like memory management and security etc.

4) Platform Independent:

  • Once we write a Python program, it can run on any platform without rewriting once again
  • Internally PVM is responsible to convert into machine-understandable form.

5) Portability: 

  • Python programs are portable. ie we can migrate from one platform to another platform very easily. Python programs will provide same results on any platform.

6) Dynamically Typed: 

  • In Python, we are not required to declare a type for variables. Whenever we are assigning the value, based on value, the type will be allocated automatically. Hence Python is considered a dynamically typed language.
  • But Java, C, etc are Statically Typed Languages b'z we have to provide type at the beginning only. 
  • This dynamic typing nature will provide more flexibility to the programmer.

7) Both Procedure Oriented and Object-Oriented: 

  • Python language supports both Procedure oriented (like C, pascal etc) and object-oriented (like C++, Java) features. Hence we can get benefits of both like security and reusability etc

8) Interpreted: 

  • We are not required to compile Python programs explicitly. Internally Python interpreter will take care of that compilation. 
  • If compilation fails interpreter raised syntax errors. Once compilation success then PVM (Python Virtual Machine) is responsible to execute.

9) Extensible: 

  • We can use other language programs in Python.
  • The main advantages of this approach are: 
  • We can use already existing legacy non-Python code 
  • We can improve the performance of the application

10) Embedded: 

  • We can use Python programs in any other language programs. i.e we can embed Python programs anywhere.

11) Extensive Library: 

  • Python has a rich inbuilt library. 
  • Being a programmer we can use this library directly and we are not responsible to implement the functionality. Etc.

Limitations of Python: 

1) Performance wise not up to the mark because it is interpreted language. 
2) Not using for mobile Applications.

Flavors of Python:

1) CPython: 

  • It is the standard flavor of Python. It can be used to work with C lanugage Applications.

2) Jython OR JPython: 

  • It is for Java Applications. It can run on JVM

3) IronPython: 

  • It is for the C#.Net platform

4) PyPy: 

  • The main advantage of PyPy is performance will be improved because JIT compiler is available inside PVM.
5) RubyPython For Ruby Platforms
6) AnacondaPython It is specially designed for handling large volume of data processing.

Python Versions:

  • Python 1.0V introduced in Jan 1994 
  • Python 2.0V introduced in October 2000 Python 3.0V introduced in December 2008
Note: Python 3 won't provide backward compatibility to Python2 i.e there is no guarantee that Python2 programs will run in Python3.

Post a Comment

0 Comments