Sunday, December 8, 2019

python

Python is a general purpose high level programming language. Python was developed by Guido Van Rossam in 1989 while working at National Research Institute at Netherlands.

But officially python was made available to public in 1991. The official date of Birth for python o feb 20th 1991.

Python is recommended as first programming language for beginners.

Example : To print hello world 

Java 

  1. public class HelloWorld
  2. {
  3.  p s v main(String[] args)
  4. {
  5.     SOP(“Hello world”);
  6.  }
  7. }

C:

#include <stdio.h>
void main()
{
   print(“Hello world”);
}

Python:

print(“Hello World”)

Eg: To print the sum of 2 numbers 

Java: 

public class Add
{
    public static void main(String[] args)
    {
         int a,b;
         a =10;
         b =20;
         System.out.println(“The Sum:” +(a+b));
          }
  }

C:

#include <stdio.h>
void main()
{

    int a,b;
    a =10;
    b =20;
    printf(“The Sum:%d”,(a+b));
 
}

Python:

a=10;
b=20;
Print(“The Sum:”,(a+b))

The name python was selected from the TV show
“The complete Monty python’s Circus”, which was broadcasted in BBC from 1969 to 1974.

Guido developed python language by taking almost all programming features from different languages.

Functional programming features from C
Object oriented programming features from C++
Scripting language features from perl and shell script 
Modular programming features from Modula-3 

Most of syntax is python derived from C and ABC languages.

In usage

Common application areas are :

Developing desktop applications 
Developing web applications 
Developing database applications 
Network programming 
Developing games 
Data analysis applications 
Machine learning 
Developing artificial intelligence applications 
IOT 

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 + keywords 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 your requirements. ( example : Jython is customized version of python to work with java application.

      3. High level programming language : python is high level programming language and hence it is 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 type for variables. Whenever we are assigning the value, based on value, type will be allocated automatically. Hence python is considered as dynamically typed language. But Java, C etc are statically typed language b’z we have to provide type at the beginning only.
  1.  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 that compilation. If compilation fails interpreter raised syntax errors. Once complilation success then PVM ( python virtual machine ) is responsible to execute.
 
     9. Extensible : we can use other languages programs in python. The main advantages of this approach are: we can use already existing legacy non-python code. We can improve performance of the application.

     10. Embedded : we can use python programs in any other languages programs. We can embedd 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 : 
Performance wise not up to mark because it is intrepreted language. Not using for mobile applications.

Flavours of python : 

  1. CPython : it is the standard flavor of python. It can be used to work with C language applications.
  2. Jython or JPython : it is for Java applications. It can run on JVM 
  3. IronPython : it is for 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. Anaconda python : it is specially designed for handling large volume of data processing.

Python versions : 
Python 1.0 v introduced in jan 1994
Python 2.0 v 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.


1 comment:

  1. Kaushik Gattu: Python >>>>> Download Now

    >>>>> Download Full

    Kaushik Gattu: Python >>>>> Download LINK

    >>>>> Download Now

    Kaushik Gattu: Python >>>>> Download Full

    >>>>> Download LINK EY

    ReplyDelete