You are on page 1of 9

Introduction to Python

Table of Contents
1. Introduction
2. History of Python
3. Features of Python
4. Applications of Python
5. Python vs Java
6. Python vs C++
Introduction to Python
• Python is a high-level, interactive, interpreted scripting language
• It is also a general-purpose programming language
• Python support both Object Oriented and Procedural Programming thus making it a Multi-
paradigm Programming language
• Python supports all the concept of Object Oriented Programming but it is NOT fully object
oriented because - The code in Python can also be written without creating classes.
• It was mainly developed for emphasis on code readability, and its syntax allows
programmers to express concepts in fewer lines of code
• Python uses whitespace indentation, rather than curly brackets or keywords, to delimit
blocks.
• Python has become the top most programming language in 2021
• Python is Open Source language thus it is freely usable and distributable
History of Python
• Python was developed in the late 1980s by Guido van Rossum at the National
Research Institute for Mathematics and Computer Science in the Netherlands.
• It was originally developed for the Amoeba Operating System.
• Python is named after a BBC comedy series Monty Python’s Flying Circus. It is
not named after the Python snake.
• The initial version 0.9.0 was published in 1991, thus it is older than Java
• Python version 1.0 was released in January 1994.
• Python version 2.0 was released in October 2000.
• Python version 3.0 was released in December 2008.
• Current version of Python is 3.10.0
Features of Python
1. Readability & Simplicity: Its code is easily readable much the same as the English language. There is no use
of the semicolon or curly-bracket, the indentation(using TAB) defines the code block. Its syntax is easier to
learn.
2. Expressive Language: Python can perform complex tasks using a few lines of code.
3. Interpreted Language: Python is an interpreted language; it means the program is executed one line at a
time. The advantage is it makes debugging easy and portable.
4. Cross-platform Language: Python interpreter can run equally on different platforms i.e. Operating Systems.
5. Portable: Python program written for one platform will work on any other platform that has the Python
interpreter installed.
6. General Purpose Language: Python is designed to be used for building software in a wide variety of
application domains
7. Interactive: Python has support for an interactive mode which allows interactive testing and debugging of
snippets of code.
8. Free and Open Source: Python is freely available for everyone. It has a large community that contributes to
develop python modules and functions.
Features of Python
7. Embeddable: You can use Python source code in another programming or scripting language and run the
code from there.
8. Extensible: You can use code from other languages like C++ in your Python code
9. Extendable: You can add low-level modules to the Python interpreter. These modules enable programmers
to add to or customize their tools to be more efficient.
10. Object-Oriented Language: Python supports object-oriented language and concepts of classes and objects.
It supports inheritance, polymorphism, and encapsulation, etc.
11. Large Standard Library: It provides a vast range of libraries for the various fields such as AI, Machine
Learning, Web Development etc.
12. GUI Programming Support: Python also supports developing Desktop application by using libraries such as
PyQT5, Tkinter, Kivy etc.
13. Dynamic Memory Allocation: In Python, we don't need to specify the data-type of the variable. When we
assign some value to the variable, it automatically allocates the memory to the variable at run time.
14. Automatic memory management: Python supports automatic memory management which means the
memory is cleared and freed automatically. You do not have to bother clearing the memory.
Applications of Python
 Desktop GUI (Graphical User Interface) Applications
 Web and Internet Development (IoT – Internet of Things)
 Games and 3D Graphics
 Scientific and Numeric Applications
 Machine Learning and Artificial Intelligence
 Data Science and Data Visualization
 Enterprise Applications (Such as e-commerce, ERP and many more.)
 Network Programming
 Embedded Applications
 Image Processing, Audio and Video Applications
 CAD (Computer-Aided Designing) Applications
 Software Testing / Writing automated tests
 Python for DevOps / System administration / Writing automation scripts
Python vs Java
• In Python there is no need for semicolon and curly braces in the A hello world program in Python
program as compared to Java which will show syntax error. print("Hello World!!")
• Python code requires fewer lines of code as compare to Java to write
the same program
A hello world program in Java
• Python is dynamically typed, its interpreter will detect the data type class Hello {
on itself as compare to Java where one has to explicitly mention the     public static void main(String args[]) {
System.out.println("Hello World!!");
data type. }
• Python supports various type of programming models such as }
imperative, object-oriented and procedural programming as compare
to Java which is completely based on the object and class-based
programming models.
• Python is easy to read and learn which is beneficial for programming
beginners as compared to Java which has a steep learning curve due
to its predefined complex syntaxes.
• Python code requires fewer resources to run since it directly gets
compiled into machine code as compare to Java which first compiles
to byte code, then needs to be compiled to machine code by the JVM
Python vs C++
• Python is more memory efficient because of its automatic A hello world program in Python
garbage collection as compared to C++ which does not support print("Hello World!!")
garbage collection.
• Python is easier to learn, use and write as compare to C++
which is hard to understand and use because of its complex A hello world program in C++
syntax. #include <iostream>
• Python uses an interpreter to execute the code which makes it using namespace std;
easy to run on almost every computer or operating system. as
compare to C++ code which does not run on other computers int main() {
until it is compiled on that computer.   cout << "Hello World";
• Python does not support Pointers likewise C++ since using   return 0;
pointers makes data unsecure and vulnerable due to memory }
leaks
• Variables defined in Python are easily accessible outside the
loop as compare to C++ in which scope of variables is limited
within the loop.

You might also like