22 September 2017

What is Python?

What is Python?

  • Python is an open source, object-oriented, high-level powerful programming language.
  • Developed by Guido van Rossum in the early 1990s. Named after Monty Python
  • Python runs on many Unix variants, on the Mac, and on Windows 2000 and later.
  • Available for download from http://www.python.org.

Python Program

  • Python programs are composed of modules
  • Modules contain statements
  • Statements contain expressions
  • Expressions create and process objects

Features of Python

Open source : Python is publicly available open source software, any one can use source code that doesn't’t cost anything.
Easy-to-learn : Popular (scripting/extension) language, clear and easy syntax, no type declarations, automatic memory management, high-level data types and operations, design to read (more English like syntax) and write (shorter code compared to C, C++, and Java) fast.
High-level Language : 
High-level language (closer to human) refers to the higher level of concept from machine language (for example assembly languages). Python is an example of a high-level language like C, C++, Perl, and Java with low-level optimization.
Portable : 
High level languages are portable, which means they are able to run across all major hardware and software platforms with few or no change in source code. Python is portable and can be used on Linux, Windows, Macintosh, Solaris, FreeBSD, OS/2, Amiga, AROS, AS/400 and many more.
Object-Oriented : Python is a full-featured object-oriented programming language, with features such as classes, inheritance, objects, and overloading.
Python is Interactive : 
Python has an interactive console where you get a Python prompt (command line) and interact with the interpreter directly to write and test your programs. This is useful for mathematical programming.
Interpreted : Python programs are interpreted, takes source code as input, and then compiles (to portable byte-code) each statement and executes it immediately. No need to compiling or linking

Extendable : Python is often referred to as a “glue” language, meaning that it is capable to work in mixed-language environment. The Python interpreter is easily extended and can add a new built-in function or modules written in C/C++/Java code.
Libraries : Databases, web services, networking, numerical packages, graphical user interfaces, 3D graphics, others.
Supports :Support from online Python community

Python Interpreter

  • In interactive mode, type Python programs and the interpreter displays the result:
  • Type python into your terminal's command line
  • After a short message, the >>> symbol will appear
  • The above symbol signals the start of a Python interpreter's command line.
  • Python interpreter evaluates inputs (For example >>> 4*(6-2) return 16)

How stable is Python?

Very stable. New, stable releases have been coming out roughly every 6 to 18 months since 1991, and this seems likely to continue. Currently there are usually around 18 months between major releases.
The latest stable releases can always be found on the Python download page. There are two recommended production-ready versions at this point in time, because at the moment there are two branches of stable releases: 2.x and 3.x. Python 3.x may be less useful than 2.x, since currently there is more third party software available for Python 2 than for Python 3. Python 2 code will generally not run unchanged in Python 3.

History

The name Python was selected from "Monty Python’s Flying Circus" which was a British sketch comedy series created by the comedy group Monty Python and broadcast by the BBC from 1969 to 1974.
Python was created in the early 1990s by Guido van Rossum at the National Research Institute for Mathematics and Computer Science in Netherlands.
Python was created as a successor of a language called ABC (All Basic Code) and released publicly in1991. Guido remains Python’s principal author, although it includes many contributions from active user community.
Between 1991 and 2001 there are several versions released, current stable release is 3.2. In 2001 the Python Software Foundation (PSF) was formed, a non-profit organization created specifically to own Python-related Intellectual Property. Zope Corporation is a sponsoring member of the PSF.
All most all Python releases are Open Source. To see the details of release versions and licence agreement of Python check here.

Python Is Easy to Use

A simple program written in C++, C, Java and Python. All program prints "Hello world".
C++ Program :
 
#include <iostream>

int main() 
  {
    std::cout << "Hello World" << std::endl;
    return 0;
  }
C Program :
    
#include <stdio.h>
int main(int argc, char ** argv) 
  {
    printf(“Hello, World!\n”); 
  }
Java Program :
public class Hello
 {
   public static void main(String argv[])
      {
        System.out.println(“Hello, World!”);
      }
 }
 
Python Program :
print ( "Hello World")

Start typing and press Enter to search