0% found this document useful (0 votes)
24 views12 pages

Python Programming: History & Applications

The document provides an overview of Python, including its history, features, and various applications across different domains such as web development, data science, and artificial intelligence. It discusses the evolution of Python versions from its inception in the late 1980s to the present, highlighting key features and libraries that contribute to its popularity. Additionally, it explains the concepts of variables and identifiers in Python, emphasizing the language's ease of use and versatility.

Uploaded by

Shanmuga Priya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views12 pages

Python Programming: History & Applications

The document provides an overview of Python, including its history, features, and various applications across different domains such as web development, data science, and artificial intelligence. It discusses the evolution of Python versions from its inception in the late 1980s to the present, highlighting key features and libraries that contribute to its popularity. Additionally, it explains the concepts of variables and identifiers in Python, emphasizing the language's ease of use and versatility.

Uploaded by

Shanmuga Priya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

UNIT – I

Python – origins – features – variable and assignment - Python basics – statement


and syntax – Identifiers – Basic style guidelines – Python objects – Standard types
and other built-in types – Internal types – Standard type operators – Standard
type - built-in functions.

Python History and Versions

o Python laid its foundation in the late 1980s.


o The implementation of Python was started in December 1989 by Guido Van Rossum at CWI in
Netherland.
o In February 1991, Guido Van Rossum published the code (labeled version 0.9.0) to [Link].
o In 1994, Python 1.0 was released with new features like lambda, map, filter, and reduce.
o Python 2.0 added new features such as list comprehensions, garbage collection systems.
o On December 3, 2008, Python 3.0 (also called "Py3K") was released. It was designed to rectify
the fundamental flaw of the language.
o ABC programming language is said to be the predecessor of Python language, which was capable
of Exception Handling and interfacing with the Amoeba Operating System.
o The following programming languages influence Python:
o ABC language.
o Modula-3

Why the Name Python?

There is a fact behind choosing the name Python. Guido van Rossum was reading the script of a
popular BBC comedy series "Monty Python's Flying Circus". It was late on-air 1970s.

Van Rossum wanted to select a name which unique, sort, and little-bit mysterious. So he decided to
select naming Python after the "Monty Python's Flying Circus" for their newly created programming
language.

The comedy series was creative and well random. It talks about everything. Thus it is slow and
unpredictable, which made it very interesting.

Python is also versatile and widely used in every technical field, such as Machine Learning, Artificial
Intelligence, Web Development, Mobile Application, Desktop Application, Scientific Calculation, etc.

Python Version List

Python programming language is being updated regularly with new features and supports. There are lots
of update in Python versions, started from 1994 to current release.
A list of Python versions with its released date is given below.

Python Version Released Date


Python 1.0 January 1994
Python 1.5 December 31, 1997
Python 1.6 September 5, 2000
Python 2.0 October 16, 2000
Python 2.1 April 17, 2001
Python 2.2 December 21, 2001
Python 2.3 July 29, 2003
Python 2.4 November 30, 2004
Python 2.5 September 19, 2006
Python 2.6 October 1, 2008
Python 2.7 July 3, 2010
Python 3.0 December 3, 2008
Python 3.1 June 27, 2009
Python 3.2 February 20, 2011
Python 3.3 September 29, 2012
Python 3.4 March 16, 2014
Python 3.5 September 13, 2015
Python 3.6 December 23, 2016
Python 3.7 June 27, 2018
Python 3.8 October 14, 2019

Usage of Python

Python is a general purpose, open source, high-level programming language and also provides number
of libraries and frameworks. Python has gained popularity because of its simplicity, easy syntax and
user-friendly environment. The usage of Python as follows.
o Desktop Applications
o Web Applications
o Data Science
o Artificial Intelligence
o Machine Learning
o Scientific Computing
o Robotics
o Internet of Things (IoT)
o Gaming
o Mobile Apps
o Data Analysis and Preprocessing

Python Applications

Python is known for its general-purpose nature that makes it applicable in almost every domain of
software development. Python makes its presence in every emerging field. It is the fastest-growing
programming language and can develop any application.

Here, we are specifying application areas where Python can be applied.


1) Web Applications

We can use Python to develop web applications. It provides libraries to handle internet protocols such
as HTML and XML, JSON, Email processing, request, beautifulSoup, Feedparser, etc. One of Python
web-framework named Django is used on Instagram. Python provides many useful frameworks, and
these are given below:

o Django and Pyramid framework(Use for heavy applications)


o Flask and Bottle (Micro-framework)
o Plone and Django CMS (Advance Content management)

2) Desktop GUI Applications

The GUI stands for the Graphical User Interface, which provides a smooth interaction to any
application. Python provides a Tk GUI library to develop a user interface. Some popular GUI libraries
are given below.

o Tkinter or Tk
o wxWidgetM
o Kivy (used for writing multitouch applications )
o PyQt or Pyside

3) Console-based Application

Console-based applications run from the command-line or shell. These applications are computer
program which are used commands to execute. This kind of application was more popular in the old
generation of computers. Python can develop this kind of application very effectively. It is famous for
having REPL, which means the Read-Eval-Print Loop that makes it the most suitable language for the
command-line applications.

Python provides many free library or module which helps to build the command-line apps. The
necessary IO libraries are used to read and write. It helps to parse argument and create console help text
out-of-the-box. There are also advance libraries that can develop independent console apps.

4) Software Development

Python is useful for the software development process. It works as a support language and can be used to
build control and management, testing, etc.

o SCons is used to build control.


o Buildbot and Apache Gumps are used for automated continuous compilation and testing.
o Round or Trac for bug tracking and project management.

5) Scientific and Numeric

This is the era of Artificial intelligence where the machine can perform the task the same as the human.
Python language is the most suitable language for Artificial intelligence or machine learning. It consists
of many scientific and mathematical libraries, which makes easy to solve complex calculations.
Implementing machine learning algorithms require complex mathematical calculation. Python has many
libraries for scientific and numeric such as Numpy, Pandas, Scipy, Scikit-learn, etc. If you have some
basic knowledge of Python, you need to import libraries on the top of the code. Few popular frameworks
of machine libraries are given below.

o SciPy
o Scikit-learn
o NumPy
o Pandas
o Matplotlib

6) Business Applications

Business Applications differ from standard applications. E-commerce and ERP are an example of a
business application. This kind of application requires extensively, scalability and readability, and
Python provides all these features.

Oddo is an example of the all-in-one Python-based application which offers a range of business
applications. Python provides a Tryton platform which is used to develop the business application.

7) Audio or Video-based Applications

Python is flexible to perform multiple tasks and can be used to create multimedia applications. Some
multimedia applications which are made by using Python are TimPlayer, cplay, etc. The few
multimedia libraries are given below.

o Gstreamer
o Pyglet
o QT Phonon

8) 3D CAD Applications

The CAD (Computer-aided design) is used to design engineering related architecture. It is used to
develop the 3D representation of a part of a system. Python can create a 3D CAD application by using
the following functionalities.

o Fandango (Popular )
o CAMVOX
o HeeksCNC
o AnyCAD
o RCAM

9) Enterprise Applications

Python can be used to create applications that can be used within an Enterprise or an Organization.
Some real-time applications are OpenERP, Tryton, Picalo, etc.
10) Image Processing Application

Python contains many libraries that are used to work with the image. The image can be manipulated
according to our requirements. Some libraries of image processing are given below.

o OpenCV
o Pillow
o SimpleITK

In this topic, we have described all types of applications where Python plays an essential role in the
development of these applications. In the next tutorial, we will learn more concepts about Python.

Python Features

Python provides many useful features which make it popular and valuable from the other programming
languages. It supports object-oriented programming, procedural programming approaches and provides
dynamic memory allocation. We have listed below a few essential features.

1) Easy to Learn and Use

Python is easy to learn as compared to other programming languages. Its syntax is straightforward and
much the same as the English language. There is no use of the semicolon or curly-bracket, the
indentation defines the code block. It is the recommended programming language for beginners.

2) Expressive Language

Python can perform complex tasks using a few lines of code. A simple example, the hello world
program you simply type print("Hello World"). It will take only one line to execute, while Java or C
takes multiple lines.

3) Interpreted Language

Python is an interpreted language; it means the Python program is executed one line at a time. The
advantage of being interpreted language, it makes debugging easy and portable.

4) Cross-platform Language

Python can run equally on different platforms such as Windows, Linux, UNIX, and Macintosh, etc. So,
we can say that Python is a portable language. It enables programmers to develop the software for
several competing platforms by writing a program only once.

5) Free and Open Source

Python is freely available for everyone. It is freely available on its official website [Link]. It
has a large community across the world that is dedicatedly working towards make new python modules
and functions. Anyone can contribute to the Python community. The open-source means, "Anyone can
download its source code without paying any penny."

6) Object-Oriented Language
Python supports object-oriented language and concepts of classes and objects come into existence. It
supports inheritance, polymorphism, and encapsulation, etc. The object-oriented procedure helps to
programmer to write reusable code and develop applications in less code.

7) Extensible

It implies that other languages such as C/C++ can be used to compile the code and thus it can be used
further in our Python code. It converts the program into byte code, and any platform can use that byte
code.

8) Large Standard Library

It provides a vast range of libraries for the various fields such as machine learning, web developer, and
also for the scripting. There are various machine learning libraries, such as Tensor flow, Pandas,
Numpy, Keras, and Pytorch, etc. Django, flask, pyramids are the popular framework for Python web
development.

9) GUI Programming Support

Graphical User Interface is used for the developing Desktop application. PyQT5, Tkinter, Kivy are the
libraries which are used for developing the web application.

10) Integrated

It can be easily integrated with languages like C, C++, and JAVA, etc. Python runs code line by line like
C,C++ Java. It makes easy to debug the code.

11. Embeddable

The code of the other programming language can use in the Python source code. We can use Python
source code in another programming language as well. It can embed other language into our code.

12. 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. Suppose we are assigned
integer value 15 to x, then we don't need to write int x = 15. Just write x = 15.

Python Variables

A variable is the name given to a memory location. A value-holding Python variable is also known as
an identifier.

Since Python is an infer language that is smart enough to determine the type of a variable, we do not
need to specify its type in Python.

Variable names must begin with a letter or an underscore, but they can be a group of both letters and
digits.

The name of the variable should be written in lowercase. Both Rahul and rahul are distinct variables.
Identifier Naming

Identifiers are things like variables. An Identifier is utilized to recognize the literals utilized in the
program. The standards to name an identifier are given underneath.

o The variable's first character must be an underscore or alphabet (_).


o Every one of the characters with the exception of the main person might be a letter set of lower-
case(a-z), capitalized (A-Z), highlight, or digit (0-9).
o White space and special characters (!, @, #, %, etc.) are not allowed in the identifier name. ^, &,
*).
o Identifier name should not be like any watchword characterized in the language.
o Names of identifiers are case-sensitive; for instance, my name, and MyName isn't something
very similar.
o Examples of valid identifiers: a123, _n, n_9, etc.
o Examples of invalid identifiers: 1a, n%4, n 9, etc.

Declaring Variable and Assigning Values

o Python doesn't tie us to pronounce a variable prior to involving it in the application. It permits
us to make a variable at the necessary time.
o In Python, we don't have to explicitly declare variables. The variable is declared automatically
whenever a value is added to it.
o The equal (=) operator is utilized to assign worth to a variable.

Object References

When we declare a variable, it is necessary to comprehend how the Python interpreter works.
Compared to a lot of other programming languages, the procedure for dealing with variables is a little
different.

Python is the exceptionally object-arranged programming language; Because of this, every data item is
a part of a particular class. Think about the accompanying model.

print("John")

Output:

John

The Python object makes a integer object and shows it to the control center. We have created a string
object in the print statement above. Make use of the built-in type() function in Python to determine its
type.
type("John")

Output:

<class 'str'>

In Python, factors are an symbolic name that is a reference or pointer to an item. The factors are utilized
to indicate objects by that name.

Let's understand the following example

a = 50

In the above image, the variable a refers to an integer object.

Suppose we assign the integer value 50 to a new variable b.

a = 50
b=a

The variable b refers to the same object that a points to because Python does not create another object.

Let's assign the new value to b. Now both variables will refer to the different objects.

a = 50
b =100
Python manages memory efficiently if we assign the same variable to two different values.

Object Identity

Every object created in Python has a unique identifier. Python gives the dependable that no two items
will have a similar identifier. The object identifier is identified using the built-in id() function. consider
about the accompanying model.

a = 50
b=a
print(id(a))
print(id(b))
# Reassigned variable a
a = 500
print(id(a))

Output:

140734982691168
140734982691168
2822056960944

We assigned the b = a, an and b both highlight a similar item. The id() function that we used to check
returned the same number. We reassign a to 500; The new object identifier was then mentioned.

Variable Names

The process for declaring the valid variable has already been discussed. Variable names can be any
length can have capitalized, lowercase (start to finish, a to z), the digit (0-9), and highlight character(_).
Take a look at the names of valid variables in the following example.
name = "Devansh"
age = 20
marks = 80.50

print(name)
print(age)
print(marks)

Output:

Devansh
20
80.5

Consider the following valid variables name.

name = "A"
Name = "B"
naMe = "C"
NAME = "D"
n_a_m_e = "E"
_name = "F"
name_ = "G"
_name_ = "H"
na56me = "I"

print(name,Name,naMe,NAME,n_a_m_e, NAME, n_a_m_e, _name, name_,_name, na56me)

Output:

ABCDEDEFGFI

We have declared a few valid variable names in the preceding example, such as name, _name_, and so
on. However, this is not recommended because it may cause confusion when we attempt to read code.
To make the code easier to read, the name of the variable ought to be descriptive.

The multi-word keywords can be created by the following method.

o Camel Case - In the camel case, each word or abbreviation in the middle of begins with a
capital letter. There is no intervention of whitespace. For example - nameOfStudent,

Common questions

Powered by AI

Python gained popularity due to its simplicity, easy-to-understand syntax, and user-friendly environment. It supports multiple paradigms, such as object-oriented and procedural programming. Python's extensive standard library and its ability to run on different platforms (cross-platform) have also contributed to its widespread usage. Furthermore, its application versatility, from web and desktop applications to data science and machine learning, make it a preferred choice among developers .

Python's dominance in data science and artificial intelligence is largely due to its extensive libraries and frameworks, such as NumPy, Pandas, SciPy, and Scikit-learn, which offer powerful data manipulation and analysis tools. These libraries simplify complex mathematical computations required for machine learning algorithms. Furthermore, visualization libraries like Matplotlib enhance the ability to present data, while frameworks such as TensorFlow and PyTorch offer sophisticated options for constructing deep learning models, cementing Python's role in these fields .

Python's simplicity stems from its straightforward syntax, similar to the English language, which reduces complexity in writing code. The absence of semicolons and curly braces eases the coding process for beginners, allowing them to focus on fundamental programming concepts without the burden of complex syntactical rules. This simplicity reduces the learning curve, making Python a recommended language for beginners .

The choice of the name "Python" by Guido van Rossum, inspired by the comedy series "Monty Python's Flying Circus," was strategic in creating a unique and memorable identity for the language. This name evokes creativity, unpredictability, and versatility, paralleling the language's features and usage. Such branding aids in fostering a distinct community culture and appeal, making Python easily recognizable and intriguing within the programming landscape .

Python 1.0, released in January 1994, introduced features like lambda, map, filter, and reduce. Python 2.0, released in October 2000, added list comprehensions and a garbage collection system. Python 3.0, released in December 2008, was designed to fix fundamental flaws in the language, such as improving readability and consistency. It incorporated many changes that were not backwards-compatible with Python 2, marking a significant evolution in Python's development .

Python supports object-oriented programming, which includes concepts like classes, objects, inheritance, polymorphism, and encapsulation. These features enable developers to create reusable code components. For instance, inheritance allows the creation of new classes based on existing ones, reducing duplication. Polymorphism enables the same interface to be used for different underlying forms (data types), and encapsulation keeps the internal states hidden, promoting modularization and simplification of code management .

As an interpreted language, Python executes code line-by-line, which simplifies debugging since errors are caught while executing rather than at compile time. This characteristic supports easier identification and resolution of problems. Moreover, Python's interpreted nature, combined with its cross-platform capabilities, allows developers to write code that can run on multiple operating systems without modification, enhancing its portability and adaptability across different environments .

The backward-incompatibility of Python 3.0 means it introduced changes that broke compatibility with Python 2.x code, requiring developers to update their codebases to accommodate these changes. This could affect existing projects by necessitating rewriting parts of the code or using tools to aid in the transition. Features such as print function differences and changes in integer division are specific examples where projects would face compatibility issues .

Python's dynamic memory allocation means that developers don't need to declare variable types explicitly, as Python automatically allocates memory based on the assigned value at runtime. This feature enhances programming flexibility by enabling quick changes to the code without concerns of type errors and manual memory management. It also aids in efficient code development as it abstracts complex memory operations away from the programmer, though it may sacrifice performance in type-specific optimizations .

The ABC language significantly influenced Python's development; it contributed to Python's user-friendly syntax and the capacity for exception handling, which were novel at the time. ABC's design aimed at teaching programming and solving simple tasks, which mirrors Python’s accessibility for beginners. Moreover, Python's ability to interface with other systems like the Amoeba operating system also draws roots from ABC’s features, showcasing its impact on Python’s versatility and technical capability .

You might also like