EmbLogic's Blog

Python

Python is a general-purpose interpreted, interactive, object-oriented ,Platfom independent and high-level programming language. Python was created by Guido van Rossum in the late eighties and early nineties. Python source code is also now available under the GNU General Public License (GPL).

Python is Interpreted: This means that it is processed at run time by the interpreter and we do not need to compile our program before executing it.

Python is Interactive: This means that we can actually work at python prompt and interact with the interpreter directly to write our programs.

Python is Object-Oriented: This means that Python supports Object-Oriented style or technique of programming that encapsulates code within objects.

Python has support for functional and structured programming methods as well as OOP. It can be used as a scripting language or can be compiled to byte-code for building large applications. It has very high-level dynamic data types and supports dynamic type checking. It supports automatic garbage collection.

Programming in Python

Python program can run on any operating system since it is platform independent language.

There are three different ways to work in Python :

  1. Interactive mode : We can enter python’s interactive mode by “python” in command line and write our commands.

  2. Script from command line : We can first make a script using an editor e.g. Vim editor with extention ‘.py’ (e.g. Hello.py) and then run this script using command ‘python hello.py’ ( hello.py being the script name) .

  3. Integrated Development Environment : We can use an IDE for python programming . IDE used in UNIX is IDLE.

Data types

Python has five standard data types :

  1. Numbers : Includes signed integers, long integers , float and complex numbers .

  2. Strings

  3. List

  4. Tuple

  5. Dictionary

Operators

Like all other languages python supports a number of operators . These are :

  1. Arithmetic operators

  2. Comparison (i.e., Relational) Operators

  3. Assignment Operators

  4. Logical Operators

  5. Bitwise Operators

  6. Membership Operators (in , not in)

  7. Identity Operators (is , is not)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>