Chap-1 Introduction to Python Programming

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

PYTHON PROGRAMMING

PYTHON PROGRAMMING

Chap - 1 By-
Prof. A. P. Chaudhari

Introduction to (M.Sc. Computer Science, SET)


HOD,

Python Programming Department of Computer Science


S.V.S’s Dadasaheb Rawal College,
Dondaicha
Chap – 1 Introduction to Python Programming

• Introduction to Python

• History of Python

• Version of Python

• Need, Features of Python

• Applications of Python

• Installing Python on Linux and Windows

• Installing Python IDE


Introduction to Python Programming:
Python is an easy to learn, powerful programming language. It
has a simple but effective approach to efficient high-level data structures
and object-oriented programming. Pythons attractive syntax and dynamic
typing, along with its defined format, make it ideal language for scripting
and rapid application development across multiple platforms.
Python is a great language with which you can learn
programming. There are many reasons for this, but simple explanation is
that it is easy to read and quick to write. Python has a very human-
friendly syntax, which makes writing beautiful code is easy.
Overview of Python:
Python is a high-level, interpreted, interactive and object-oriented
scripting language. Python is designed to be highly readable. It uses English
keywords frequently where as other languages use punctuation, and it has less
syntactical constructions than other languages.
• Python is Interpreted − Python is processed at runtime by the interpreter.
You do not need to compile your program before executing it. This is similar to
PERL and PHP.
• Python is Interactive − You can actually sit at a Python prompt and interact
with the interpreter directly to write your programs.
• Python is Object-Oriented − Python supports Object-Oriented style or
technique of programming that encapsulates code within objects.
• Python is a Beginner's Language − Python is a great language for the
beginner-level programmers and supports the development of a wide range of
applications from simple text processing to WWW browsers to games.
History of Python:
Python was developed by Guido van Rossum in the late
1980s and early 1990s at the National Research Institute for
Mathematics and Computer Science in the Netherlands. It first
appeared in 1991, Python 2.0 was released in the year 2000 and
Python 3.0 was released in the year 2008.
The language was named Python after the famous British television
comedy show Monty Python’s Flying Circus, which was one of Guido’s favorite
television Program.
Python is derived from many other languages, including ABC, Modula-3,
C, C++, Algol-68, SmallTalk, and Unix shell and other scripting languages.
Python is copyrighted. Like Perl, Python source code is now available
under the GNU General Public License (GPL). Python is now maintained by a
core development team at the institute, although Guido van Rossum still holds a
vital role in directing its progress.
Version of Python:
The following table lists all the important versions of Python:

Version Release Date Important Features


Python 0.9.0 February 1991 •Classes with inheritance exception
handling
•Functions
•Modules

Python 1.0 January 1994 •Functional programming tools


(lambda, map, filter and reduce).
•Support for complex numbers.
•Functions with keyword arguments

Python 2.0 October 2000 •List comprehension.

Python 2.7.0 - July 2010 •Cycle-detecting garbage collector.

EOL - Jan 2020 •Support for Unicode. Unification of


data types and classes
Version of Python:
The following table lists all the important versions of Python:

Version Release Date Important Features

Python 3 December 2008 •Backward incompatible.

Python 3.6 December 2016 •print keyword changed to print()


function
Python 3.6.5 March 2018
•raw_input() function depreciated
•Unified str/Unicode types.
•Utilities for automatic conversion of
Pytthon 2.x code

Python 3.7.0 May 2018 •New C API for thread-local storage


•Built-in breakpoint()
•Data classes
•Context variables
•More..
Version of Python:
The following table lists all the important versions of Python:

Version Release Date Important Features


Python 3.8 October 2019 •Assignment Expression
•Positional-only parameters
•Parallel filesystem cache for
compiled bytecode files
•More..

Python 3.9 - October 2020 •Dictionary Merge & Update


Current Version Operators
•New removeprefix() and
removesuffix() string methods
•Builtin Generic Types
•More..
Needs of Python:
According to the Institute of Electrical Electronics and Electronics
Engineers (IEEE), Python ranks third after C and Java. Python job
market search ranks fifth, according to www.indeed.co.in dated on 2016.
Clearly, all the data shows the growing demand in the Python job market.
This language is great if you just want to learn for fun or build
your career around Python. Python has a major role to play in
surprisingly new technologies. Whether it’s a cloud platform, mobile app
development, BigData, new block chain technology. Python language
platform for developing and delivering scalable and robust deliver
applications.
Features of Python:
• Easy-to-learn − Python has few keywords, simple structure and a clearly
defined syntax. This allows the student to pick up the language quickly.
• Easy-to-read − Python code is more clearly defined and visible to the eyes.
• Easy-to-maintain − Python's source code is fairly easy-to-maintain.
• A broad standard library − Python's bulk of the library is very portable.
Python programs can run on any platform, you can carry code created in
Windows machine and run it on Mac or Linux.
• Portable − Python can run on a wide variety of hardware platforms and has
the same interface on all platforms.
• 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.
Applications of Python:
Python is known for its general-purpose nature that applies it to every
domain of software development. The dragon can be used in any area of
development.
One of the most famous platform where Python is extensively used is
YouTube. The other places where you will find Python being extensively used are
the special effects in Hollywood movies, drug evolution and discovery, traffic
control system, ERP systems, cloud hosting, e-commerce platform, CRM
systems and whatever field you can think of.
Here we are specifying the application are where the Python can be
applied:
1. Web Applications: We can use Python to develop web applications. HTML &
XML, Email Processing, Request etc. libraries are available to handle similar
Internet Protocols.
Applications of Python:
2. Desktop GUI Applications: Python provides GUI library to develop user
interface in Python based application, Some other useful toolkits wxWidgets,
Kivy, pyqt that are useable on several platforms. The Kivy is popular for writing
multitouch applications.
3. Software Development: Python is helpful for software development process.
It works as a support language and can be used for build control and
management, testing etc.
4. Scientific and Numeric: Python is popular and widely used in scientific and
numeric computing. Some useful library and package are SciPy, Pandas, Ipython
etc. SciPy is group of packages of engineering, science and mathematics.
5. Business Applications: Python is used to build business applications like
ERP and e-commerce systems. Tryton is a high level application platform.
Applications of Python:
6. Console Based Application: We can use Python to develop console based
applications. E.g.: Ipython.
7. Audio or Video based applications: Python is awesome to perform multiple
task and can be used to develop multimedia applications. Some of real
applications are: TimPlayer, cplay etc.
8. 3D CAD Applications: To create CAD application Fandango is a real
application which provides full features of CAD.
9. Enterprise Applications: Python can be used to create applications which
can be used within an Enterprise or an Organization. Some real time applications
are: OpenErp, Tryton, Picalo etc.
10. Applications for Images: Using Python several applications can be
developed for image. Applications developed are: VPython, Gogh, imgSeek etc.
Installing Python on Windows:
Python is available on a wide variety of platforms including Linux and
Mac OS X. Lets understand how to setup our Python environment on Windows.
Here are the simple steps to Install Python on Windows machine:
1) Open a Web browser and go to https://www.python.org/downloads/.
2) Follow the link for the Windows installer python-XYZ.msi file where XYZ is the
version you need to install.
3) To use this installer python-XYZ.msi, the Windows system must support
Microsoft Installer 2.0. Save the installer file to your local machine and then
run it to find out if your machine supports MSI.
4) Run the downloaded file. This brings up the Python install wizard, which is
really easy to use. Just accept the default settings, wait until the install is
finished, and you are done.
Installing Python IDE:
Code and debug programs are easily created for Python code editor
developers. Using this Python IDE (Integrated Development Environment) you
can manage a large database and deploy quickly. Developers can use these
editors to create desktop or web applications.
Many Pythons IDEs are available. The most useful Python IDE are as
Follows:
1) Pycharm: Pycharm is a cross-platform IDE used for Python programming.
This editor can be used on Windows, Mac OS and Linux. This software
contains API that can be used by the developers to write their own Python
plugins so that they can extend the basic functionalities.
2) Spyder: Spyder is a scientific integrated development environment written in
Python. This software is designed for and by scientists who can integrate with
Matplotlib, SciPy, NumPy, Pandas and other open-source software. Spyder is
available through Anaconda distribution on Windows, MacOS and Linux.
Installing Python IDE:
3) IDLE: IDLE (Integrated Development and Learning Environment) is a default
editor that comes with Python. This software helps a beginners to learn Python
easily. IDLE software package is optional for many Linux distributions. The tool
can be used on Windows, MacOS, and Linux.
4) Visual Studio Code: Visual Studio Code (VS Code) is an open-source
environment developed by Microsoft. This IDE can be used for Python
development.
5) Atom: Atom is a useful code editor tool preferred by programmers due to its
simple interface compared to the other editors. Atom users can submit packages
and them for the software.
6) Jupyter: Jupyter is a tool for people who have just started with data science. It
is easy to use, interactive data science IDE across many programming
languages that just not work as an editor, but also as an educational tool or
presentation.

You might also like