Python
Python
is a programming language that combines the features of C and Java. It offers
elegant style of developing programs like C. When the programmers want to go
for object orientation, Python offers classes and objects like Java.
Python is
open source software, which means anybody can freely download it from
www.python.org and use it to develop programs. Its source code can be accessed
and modified as required in the projects.
Features
of Python
There are
various reasons why Python is gaining good popularity in the programming
community. The following are some of the important features of Python:
1. Simple: Python is a simple programming language. When we
read a Python program, we feel like reading English sentences. It means more
clarity and less stress on understanding the syntax of the language. Hence,
developing and understanding programs will become easy.
2. Easy to learn: Python uses very few keywords. Its programs use very
simple structure. So, developing programs in Python become easy. Also, Python
resembles C language. Most of the language constructs in C are also available in
Python. Hence, migrating from C to Python is easy for programmers.
3. Open source: There is no need to pay for Python software. Python
can be freely downloaded from www.python.org website. Its source code can be
read, modified and can be used in programs as desired by the programmers.
4. High level language: Programming languages are
of two types: low level and high level. A low level language uses machine code
instructions to develop programs. These instructions directly interact with the
CPU. Machine language and assembly language are called low level languages.
High level languages use English words to develop programs. These are easy to
learn and use. Like COBOL, PHP or Java, Python also uses English words in its
programs and hence it is called high level programming language.
5. Dynamically typed: In Python, we need not
declare anything. An assignment statement binds a name to an object, and the
object can be of any type. If a name is assigned to an object of one type, it
may later be assigned to an object of a different type. This is the meaning of
the saying that Python is a dynamically typed language. Languages like C and
Java are statically typed. In these languages, the variable names and data
types should be mentioned properly. Attempting to assign an object of the wrong
type to a variable name triggers error or exception.
6. Platform independent: When a Python program is
compiled using a Python compiler, it generates byte code. Python’s byte code
represents a fixed set of instructions that run on all operating systems and
hardware. Using a Python Virtual Machine (PVM), anybody can run these byte code
instructions on any computer system. Hence, Python programs are not dependent
on any specific operating system. We can use Python on almost all operating systems
like UNIX, Linux, Windows,Macintosh, Solaris, OS/2, Amiga, AROS, AS/400, etc.
This makes Python an ideal programming language for any network or Internet.
7. Portable: When a program yields the same result on any
computer in the world, then it is called a portable program. Python programs
will give the same result since they are platform independent. Once a Python
program is written, it can run on any computer system using PVM. However,
Python also contains some system dependent modules (or code), which are
specific to operating system. Programmers should be careful about such code
while developing the software if they want it to be completely portable.
8. Procedure and object oriented: Python
is a procedure oriented as well as an object oriented programming language. In
procedure oriented programming languages (e.g. C and Pascal), the programs are
built using functions and procedures. But in object oriented languages (e.g.
C++ and Java), the programs use classes and objects.
No comments:
Post a Comment