0% found this document useful (0 votes)
80 views43 pages

Introduction to Python Essentials

This document provides an overview of an introductory session on Python that will cover essentials, programming, and analytics. It introduces Python as a dynamic and versatile language used widely in various domains like web development, data analysis, and science. Key topics to be covered include Python's history, paradigms, uses cases, installation process, integrated development environments, and performance considerations.

Uploaded by

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

Introduction to Python Essentials

This document provides an overview of an introductory session on Python that will cover essentials, programming, and analytics. It introduces Python as a dynamic and versatile language used widely in various domains like web development, data analysis, and science. Key topics to be covered include Python's history, paradigms, uses cases, installation process, integrated development environments, and performance considerations.

Uploaded by

Adiba Naz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
  • Introduction to Python
  • What is Python?
  • Why Python?
  • Who Uses Python?
  • Python Language Characteristics
  • History of Python
  • Zen of Python
  • Performance of Python
  • Technical Issues and Installation
  • Running Python
  • Python Commands
  • Typings in Python
  • Integrated Development Environment (IDLE)
  • Differences: Python 2 vs Python 3
  • Data Types

FDP- 102

on
Python: Essentials,
Programming and Analytics

Session-I: Introduction to Python


Taken by
Dr. Aakash,
Assistant Professor (Operation & IT),
Amity University, Noida, Uttar
Pradesh
Date: 28-Oct-2022 (Friday)
Timings: 3.00 PM to 5.00 PM
• Python: Dynamic programming

What is language which supports


several different programing
paradigms:

Python? o Procedural Programming


o Object Oriented
Programming (OOP)
o Functional Programming

• Standard: Python byte code is


executed in the Python
interpreter (similar to Java)

• → platform independent code


• Extremely versatile language
o Website development, data

Why analysis,
maintenance,
analysis, etc.
server
numerical


Python? •
Syntax is clear, easy to read and
learn (almost pseudo code)
Common language
• Intuitive object oriented
programming
• Full modularity, hierarchical
packages
• Comprehensive standard library
for many tasks
• Big community
• Simply extendable via C/C++,
wrapping of C/C++ libraries
• Focus: Programming speed

Who uses •
On-line games
Web services
• Applications
Python? • Science
• Instrument control
• Embedded systems

Link:
[Link]/wiki/Lis
t_of_Python_software
Python is used for everything!
So who uses For example:
• “massively multiplayer
Python and online role-playing games”
like Eve Online, science
fiction’s answer to World of
what for? Warcraft,
• web applications written in
a framework built on
Python called “Django”,
• desktop applications like
Blender, the 3-d animation
suite which makes
considerable use of Python
scripts,
• the Scientific Python
libraries (“NumPy”),
instrument control and
embedded systems
What sort of
language is
Python?
• Python does not have to be
explicitly compiled but
behind the scenes there is a
Continued… system that compiles
Python into an intermediate
code which is stashed away
to make things faster in
future.
• But it does this without you
having to do anything
explicit yourself.
• So from the point of view of
how you use it you can treat
it as a purely interpreted
language like the shell or
Perl.
• Start implementation in December
1989 by Guido van Rossum (CWI)
• 16.10.2000: Python 2.0
o Unicode support
o Garbage collector
o Development process more
community oriented
• 3.12.2008: Python 3.0
o Not 100% backwards compatible

History 2007 & 2010 most popular
programming language (TIOBE Index: is
an indicator of the popularity of
programming languages.)
• Recommendation for scientific
programming (Nature News, NPG,
2015)
• Current version (October 24, 2022):
Python 3.11 (Link:
[Link]
11.0/[Link])
• Python 2 is out of support! (Link:
[Link]
11 software principles that
influence the design of Python:
1) Beautiful is better than ugly.
Zen of 2) Explicit is better than implicit.
3) Simple is better than complex.
4) Complex is better than
Python complicated.
5) Flat is better than nested.
6) Sparse is better than dense.
7) Readability counts.
8) Special cases aren’t special
enough to break the rules.
9) Although practicality beats
purity.
10)Errors should never pass
silently.
11)Unless explicitly silenced.
Is Python • For user programs: Python is
fast enough!

fast • Most parts of Python are


written in C

enough? For compute intensive
algorithms: Fortran, C, C++
might be better
• Performance-critical parts can
be re-implemented in C/C++ if
necessary
• First analyze, then optimize!
Technical • Downloads Link:
[Link]
Issues: • Documentation Link:
[Link]

Installing & • Free book Link:


[Link]

Running • Python comes pre-


installed with Mac OS X
Python •
and Linux.
Windows binaries from
• Link: [Link]
• You might not have to do
anything!
• Go to [Link] and
download the latest version
of Python (version 3.11 or
3.7 as of this writing).
Installing • It should be painless to
install.

Python • If you have a Mac or Linux,


you may already have
Python on your computer,
though it may be an older
version.
• If it is version 2.7 or earlier,
then you should install the
latest version, as many of
the programs in this book
will not work correctly on
older versions.
METHODS
How to 1) Installing Python 3
2) Installing Python 2
Install 3) Adding the Python Path
Python on to Windows

Windows • Link for Guiding


Python Installation
in Windows:
[Link]
om/Install-Python-on-
Windows
The interpreter can be started in interactive mode
• IDLE is a simple integrated
development environment
(IDE) that comes with Python.
Integrated
Development • It’s a program that allows you
to type in your programs and
Environment ( run them.

IDLE) • There are other IDEs for


Python, but for now I would
suggest sticking with IDLE as it
is simple to use.

• You can find IDLE in the


Python 3.4 folder on your
computer.
• When you first start IDLE, it
starts up in the shell, which
is an interactive window
where you can type in
Python code and see the
CONTINUED… output in the same window.

• I often use the shell in place


of my calculator or to try
out small pieces of code.

• But most of the time you


will want to open up a new
window and type the
program in there.

FDP- 102 
on 
Python: Essentials, 
Programming and Analytics
Session-I: Introduction to Python
Taken by 
Dr. Aakash,
Assistan
What is 
Python?
•
Python: Dynamic programming
language
which
supports
several
different
programing
paradigms:
o
Procedural P
Why 
Python?
•
Extremely versatile language
o
Website development, data
analysis,
server
maintenance,
numerical
analysis, etc
Who uses 
Python?
• On-line games
• Web services
• Applications
• Science
• Instrument control
• Embedded systems
Link:
en.wi
So who uses 
Python and 
what for?
Python is used for everything!
For example:
•
“massively
multiplayer
online role-playing g
What sort of 
language is 
Python?
Continued…
• Python does not have to be
explicitly
compiled
but
behind the scenes there is a
system
that
compiles
Python into
History
•
Start
implementation
in
December
1989 by Guido van Rossum (CWI)
•
16.10.2000: Python 2.0
o
Unicode support
o
Garbag
Zen of 
Python
11
software
principles
that
influence the design of Python:
1) Beautiful is better than ugly.
2) Explicit is b
Is Python 
fast 
enough?
• For user programs: Python is
fast enough!
• Most
parts
of
Python
are
written in C
• For
compute
in

You might also like