Introduction to Python - ProLearner

 Python Introduction

INTRODUCTION

The word Python - isn't it scary? Does it bring the image of big reptile that we prefer to see either in jungles or zoo ? Well, it's time to change the image. Now on, you'll remember word Python for its playfulness and pleasant productivity. Confused? Well, Don't be - because, now on you'll get introduced to a new programming language namely 'Python', which promises to make you a big programming fan :-).

Python programming language was developed by Guido Van Rossum in February 1991. Python is based on or influenced with two programming languages:

 ABC language, a teaching language created as a replacement of BASIC, and

Python is an easy-to-learn yet powerful object oriented programming language. It is a very high level programming language yet as powerful as many other middle-level not sohigh-level languages like C, C++, Java etc.
In this chapter, we shall introduce you to playful world of Piquant Python [Word 'Piquant' means pleasantly stimulating or exciting to the mind]. So, are we ready? And... here we go.


PYTHON-PLUSES

Though Python language came into being in early 1990's, yet it is competing with ever-popular languages such as C, C++, Java etc. in popularity index. Although, it is not perfect for every type of application, yet it has many strengths that make it a good choice for many situations. Let's see what are these pluses of Python.

1. Easy to Use

Python is compact and very easy to use object oriented language with very simple syntax rules. It is a very high level language and thus very-very programmer-friendly.

2. Expressive Language

Python's expressiveness means it is more capable to expressing the code's purpose than many other languages. Reason being - fewer lines of code, simpler syntax. For example, consider following two sets of codes:

// In C++: Swap Values
int a 2, b = 3, tmp;
tmp = a;
a=b;
b = tmp;
# In Python : Swap values
a, b = 2, 3 a, b = b, a

which one is compact and easier to understand? Need I say more? :). This is the simplest example, you'll find many more such examples of Python's expressiveness in the due course.

3. Interpreted Language

Python is an interpreted language, not a compiled language. This means that the Python installation interprets and executes the code line by line at a time. It makes Python an easy-to-debug language and thus suitable for beginners to advanced users.

4. Its Completeness

When you install Python, you get everything you need to do real work. You do not need to download and install additional libraries; all types of required functionality is available through various modules of Python standard library¹. For example, for diverse functionality such as emails, web-pages, databases, GUI development, network connections and many more, everything is available in Python standard library. Thus, it is also called - Python follows "Batteries Included" philosophy.

5. Cross-platform Language

Python can run equally well on variety of platforms - Windows, Linux/UNIX, Macintosh,

supercomputers, smart phones etc.? Isn't that amazing? And that makes Python a true cross-platform language. Or in other words, Python is a portable language.

6. Free and Open Source

Python language is freely available i.e., without any cost (from www.python.org). And not only is it free, its source-code (ie., complete program instructions) is also available, ie, it is open-source also. Do you know, you can modify, improve/extend an open-source software!

7. Variety of Usage/Applications

Python has evolved into a powerful, complete and useful language over these years. These days

Python is being used in many diverse fields/applications, some of which are:

Scripting

Web Applications

Rapid Prototyping

GUI Programs

Game development System Administrations

Database Applications

PYTHON SOME MINUSES (SO HUMAN LIKE)

Although Python is very powerful yet simple language with so many advantages, it is not the Perfect Programming language. There are some areas where Python does not offer much or is not that capable. Let's see what these are:

1. Not the Fastest Language

Python is an interpreted language not a fully compiled one. Python is first semi-compiled into an internal byte-code, which is then exerted by a Python interpreter. Fully compiled languages are faster than their interpreted counterparts. So, here Python is little weaker though it offers faster development times but execution-times are not that fast compared to some compiled languages.

2. Lesser Libraries than C, Java, Perl

Python offers library support for almost all computing programs, but its library is still not competent with languages like C, Java, Perl as they have larger collections available. Sometimes in some cases, these languages offer better and multiple solutions than Python.

3. Not Strong on Type-binding

Python interpreter is not very strong on catching 'Type-mismatch' issues. For example, if you declare a variable as integer but later store a string value in it, Python won't complain or pin-point it.

4. Not Easily Convertible

Because of its lack of syntax, Python is an easy language to program in. But this advantage has a

flip-side too: it becomes a disadvantage when it comes to translating a program into another programming language. This is because most other languages have structured defined syntax. Since most other programming languages have strong-syntax, the translation from Python to another language would require the user to carefully examine the Python code and its structure

and then implement the same structure into other programming language's syntax. So, now you are familiar with what all Python offers. As a free and open-source language, its users are growing by leaps and bounds.

Comments

Post a Comment

Popular posts from this blog

Become Healthy Goal - Python Program

Calculator in C++

Interpretation vs Compilation