Python Introduction

Introduction

 
This chapter describes why we use python, and what are some of the features of Python.
 

Python

 
 
Appeal
 
“It always hurts if people pronunciate your name incorrectly for some reason such as ascent. So before narrating my story and feature I want to tell you guys how to pronounce my name because it makes me feel good.”
 
Pronunciation- "Py-Tho-N"
 
I hope now I am clear, so let's explore the features of Python one by one.
 

Simple

 
“If am saying Python is simple and easy to use, then don't just blindly believe me; just code in it and feel the difference.”
 
Python is seriously simple and a ready-to-mingle type programming language as per my latest experience with Python. It is a real programming language because it offers a more versatile structure and support for large programs than any other scripts do.
 

Reliable

 
If you ask people or students “Which language offers more error checking?”
 
Then, they will frankly tell you “C”.
 
But if their answer is "C", then I think they haven't heard about "Python". Yes, I said that and I mean it. Python offers much more error checking than C. In spite of this, Python offers high-level data types and flexibility.
 
It offers flexible arrays and dictionaries too and if you have any doubt regarding its generation then let me be clear, it's a "High-Level Language".
 

Interpreted

 
Python is an interpreted language doesn't that sound cool and exciting to you? That means Python will save you considerable time during program development because now you don't need any type of compilation and linking.
 
You can use the interpreter interactively that somehow makes your efforts as well as timeless, what else a programmer needs. Since time is money for us.
 

Reusability

 
Python gives one more freedom to you. Now with Python, you can easily divide or split your program into several sets of modules that can be later used in other Python programs.
 
It comes with large numbers of standard modules that you can use as the base of your Python program. If you still didn't get the theme of this feature then let me explain it for you with some familiar examples.
 
Some of what the Python modules offer:
  • File I/O.
  • System Calls.
  • Sockets.
  • Interface Toolkits.
  • GUI Toolkits.
These cool features make Python a "Procedure Oriented Language".
 

Object-Oriented

 
If you are an object-oriented guy and can't dream apart or over it, then Python can be a new host for you. It's both procedure-oriented as well as object-oriented like in .NET, C++, Java, and some others.
 
 

Open Source

 
If I am saying it is open source then that means it's free (as we know) and we the programmers and geeks love the things that come free and easy to us.
 
You can read what works behind the Python, can read it's source code, make changes in it, and many other things. Aren't all these features enough to make Python user-friendly or a lovable language? Yes, they are.
 

Portable

 
Since it's open-source, it supports this feature too. You can run Python or I can say Python allows you that you can make it run in nearly any environment.
 
Python runs happily in the environments Windows, Mac, Linux, Solaris, Amiga, AROS, Playstation, Pocket PC, FreeBSD, and several others.
 

Understandable and Readable

 
Python is not only much simpler than any other language (that offers a very high level of features) but also easily understandable and readable. Programs written in Python are much shorter than any other programming language like C, C++, Java, and so on. (Kindly don't ask why .NET isn't here).
 
The reasons behind it are:
  • High-level Data Types.
  • Flexibility in Arrays.
  • No variable or argument declaration is necessary.
  • Many more

Extensible

 
“Python is extensible too.”
 
 
If you know how C works, then Python might gain your attention or your interest. As in C, it is very easy to add a new built-in function to the C interpreter.
 
You can always link your Python interpreter into an application written in C and use it anytime as an extension.
 

Comparison of various languages

 

Goodbye World | C++

 
So, let's have a look at a basic program in C++.
  1. #include<iostream.h>  
  2. Int main()  
  3. {  
  4.     cout << “GoodBye World!”;  
Output
 
GoodBye World
 

GoodBye World | Java

 
So, let's have a look at a basic program in Java.
  1. public class Main  
  2. {  
  3. public static void main(String[] args)  
  4. {  
  5.     System.out.println("GoodBye World!");  
  6. }  
  7. }
Output
 
GoodBye World
 

GoodBye World | C#

 
So, let's have a look at a basic program in C#.
  1. using System;  
  2. public class Hello2  
  3. {  
  4. public static void Main()  
  5. {  
  6.     Console.WriteLine("GoodBye World!");  
  7.    }  
  8. }  
Output
 
GoodBye World
 

GoodBye World | Python

 
Now, it's Python. Have a look:
  1. Print “GoodBye World!” 
Output
 
GoodBye World
 
And it's still “GoodBye World” guys. 
 

Conclusion

 
In the next chapter, we will discuss python tokens.
Author
Abhishek Jaiswal
95 19.8k 9.6m
Next » How To Install Python On Windows