SlideShare a Scribd company logo
11
Most read
12
Most read
13
Most read
Python Tutorial | Python Programming Language
Agenda
What is Python…?
Differences between program and scripting language
History of Python
Scope of Python
Why do people use Python?
Installing Python IDE
Who uses python today
What can I do with python
A Sample Code
Python code execution
Running Python
What is Python…?
Python is a general purpose programming language that is
often applied in scripting roles.
So, Python is programming language as well as scripting
language.
Python is also called as Interpreted language
Differences between program and
scripting language
Program
a program is executed (i.e.
the source is first compiled,
and the result of that
compilation is expected)
A "program" in general, is a
sequence of instructions
written so that a computer
can perform certain task.
Scripting
a script is interpreted
A "script" is code written in
a scripting language. A
scripting language is nothing
but a type of programming
language in which we can
write code to control
another software application.
History
Invented in the Netherlands, early 90s by Guido van Rossum
Python was conceived in the late 1980s and its
implementation was started in December 1989
Guido V
an Rossum is fan of ‘Monty Python’s Flying
Circus’, this is a famous TV show in Netherlands
Named after Monty Python
Open sourced from the beginning
Python’s Benevolent Dictator For Life
“Python is an experiment in how much
freedom program-mers need. Too
much freedom and nobody can read
another's code; too little and
expressive-ness is endangered.”
- Guido van Rossum
Why was python created?
"My original motivation for creating Python was the
perceived need for a higher level language in the
Amoeba [Operating Systems] project.
I realized that the development of system
Moreover, doing these things in the Bourne
administration utilities in C was taking too long.
shell
wouldn'twork foravarietyof reasons. ...
So, there was a need for a language that
would bridge thegap between C and the shell”
- GuidoVan Rossum
Scope of Python
Science
- Bioinformatics
SystemAdministration
-Unix
-Web logic
-Web sphere
Web Application Development
-CGI
-Jython – Servlets
Testing scripts
Why do people use Python…?
The following primary factors cited by Python users
seem to be these:
Python is object-oriented
Structure supports such concepts as polymorphism, operation
overloading, and multiple inheritance.
Indentation
Indentation is one of the greatest future in Python.
It's free (open source)
Downloading and installing Python is free and easy
Source code is easily accessible
It's powerful
- Dynamic typing
- Built-in types and tools
- Library utilities
- Third party utilities (e.g. Numeric, NumPy, SciPy)
-Automatic memory management
It's portable
- Python runs virtually every major platform used today
-As long as you have a compatible Python interpreter installed,
Python programs will run in exactly the same manner,
irrespective of platform.
It's mixable
- Python can be linked to components written in other languages easily
- Linking to fast, compiled code is useful to computationally intensive
problems
- - Python/C integration is quite common
It's easy to use
- No intermediate compile and link steps as in C/ C++
- Python programs are compiled automatically to an intermediate
form called bytecode, which the interpreter then reads
- This gives Python the development speed of an interpreter without
the performance loss inherent in purely interpreted languages
It's easy to learn
- Structure and syntax are pretty intuitive and easy to grasp
Installing Python
Python is pre-installed on most Unix systems, including
Linux and MAC OS X
But for in Windows Operating Systems , user can
download from the https://www.python.org/downloads/
- from the above link download latest version of python
IDE and install, recent version is 3.4.1 but most of
them uses version 2.7.7 only
After installing the
Python Ver#2.7.7, go to
start menu then click on
python 2.7 in that one
you can select python
(command line) it is
prompt with >>>
Who uses python today…
Python is being applied in real revenue-generating products
by real companies. For instance:
Google makes extensive use of Python in its web search
system, and employs Python’s creator.
Intel, Cisco, Hewlett-Packard, Seagate, Qualcomm, and IBM
use Python for hardware testing.
ESRI uses Python as an end-user customization tool for its
popular GIS mapping products.
The Y
ouTube video sharing service is largely written in
Python
What can I do with Python…?
System programming
Graphical User Interface Programming
Internet Scripting
Component Integration
Database Programming
Gaming, Images, XML , Robot and more
A Sample Code
# A comment.
#Another one.
x = 34 - 23
y = “Hello”
z = 3.45
if z == 3.45 or y == “Hello”:
x = x + 1
# String concat.
y = y + “ World”
print x
print y
Enough to understand the code
Indentation matters to code meaning
-Block structure indicated by indentation
First assignment to a variable creates it
- Variable types don’t need to be declared.
-Python figures out the variable types on its own.
Assignment is = and comparison is ==
For numbers + - * / % are as expected
- Special use of + for string concatenation and % for string
formatting (as in C’s printf)
Logical operators are words (and, or, not) not symbols
The basic printing command is print
Python Code Execution
Python’s traditional runtime execution model: source code you
type is translated to byte code, which is then run by the Python
Virtual Machine. Your code is automatically compiled, but then
it is interpreted.
Source code extension is .py
Byte code extension is .pyc (compiled python code)
Running Python
Once you're inside the Python interpreter, type in commands at will.
• Examples:
>>> print 'Hello world'
Hello world
# Relevant output is displayed on subsequent lines without the >>>
symbol
>>> x = [0,1,2]
# Quantities stored in memory are not displayed by default
>>> x
# If a quantity is stored in memory, typing its name will display it
[0,1,2]
>>> 2+3
5

More Related Content

PDF
piano-adventures-lesson-book-level-2b
Ivy He
 
PDF
Ice age 4 – fishing
Jim Kammerud
 
PDF
TTF.INF.01
Arcee327
 
PDF
01 aprende a dibujar comic
Artes e Encantos
 
PDF
Certificat de travail MTN
Blaise Ogougou KADJO
 
PDF
Zagor extra 265 - Tajna jedne karte
StripovizijaStripovi
 
PDF
Kupdf.com zagor senka-smrti
zoran radovic
 
PDF
Monthly Khazina-e-Ruhaniyaat April’2025 (Vol.15, Issue 12)
Darul Amal Chishtia
 
piano-adventures-lesson-book-level-2b
Ivy He
 
Ice age 4 – fishing
Jim Kammerud
 
TTF.INF.01
Arcee327
 
01 aprende a dibujar comic
Artes e Encantos
 
Certificat de travail MTN
Blaise Ogougou KADJO
 
Zagor extra 265 - Tajna jedne karte
StripovizijaStripovi
 
Kupdf.com zagor senka-smrti
zoran radovic
 
Monthly Khazina-e-Ruhaniyaat April’2025 (Vol.15, Issue 12)
Darul Amal Chishtia
 

What's hot (20)

PDF
0311. Indijanski Cirkus
Tompa *
 
PDF
0740. VELIKI ČAROBNJAK
Tompa *
 
PDF
15.20 Carry On
JulesWilkinson
 
PDF
Ice Age 5 - Seq 120 "MISSION"
Eric Elrod
 
PDF
858 sakal nezbi
Milenko Gavric
 
PDF
Gymnasiebetyg s-v
Mattis Hildonen
 
PDF
5-certificat de travail 03 HSE
Djaber Djefafla
 
PDF
ZS - 0370 - Teks Viler - BOKSER PAT_Compressed.pdf
Stripovizijacom
 
PDF
Fontanarrosa Roberto 20 Años Con Inodoro Pereyra
Lautaro Lavarello
 
PDF
TTF.MO.01
Arcee327
 
PDF
QA-QC CERTIFICATE
Vivek Venugopal
 
PDF
TFA.ARVL.05
Arcee327
 
PDF
SAIM CHISHTI BOOKS Madiny Dian Kalin pdf
Saim Chishti Research Center Faisalabad
 
PDF
1079 komandant mark - konacna pobeda
Goci Bisevac
 
PDF
TTF.MTMTE.57
Arcee327
 
PDF
Zagor 633 izabelina proslost (ras & emeri)(7 mb)
zoran radovic
 
PDF
Attestation de Travail SPC
Becket Georges Emman GBEDE
 
PDF
Dylan dog 07 zona sumraka
Sinisa Savicevic
 
PDF
12th standard Business Studies Marketing Management Project 2019-20 on KHAKHR...
Priyanshu206
 
PDF
ZMR Solar Water Heaters
ZMERLY & CO
 
0311. Indijanski Cirkus
Tompa *
 
0740. VELIKI ČAROBNJAK
Tompa *
 
15.20 Carry On
JulesWilkinson
 
Ice Age 5 - Seq 120 "MISSION"
Eric Elrod
 
858 sakal nezbi
Milenko Gavric
 
Gymnasiebetyg s-v
Mattis Hildonen
 
5-certificat de travail 03 HSE
Djaber Djefafla
 
ZS - 0370 - Teks Viler - BOKSER PAT_Compressed.pdf
Stripovizijacom
 
Fontanarrosa Roberto 20 Años Con Inodoro Pereyra
Lautaro Lavarello
 
TTF.MO.01
Arcee327
 
QA-QC CERTIFICATE
Vivek Venugopal
 
TFA.ARVL.05
Arcee327
 
SAIM CHISHTI BOOKS Madiny Dian Kalin pdf
Saim Chishti Research Center Faisalabad
 
1079 komandant mark - konacna pobeda
Goci Bisevac
 
TTF.MTMTE.57
Arcee327
 
Zagor 633 izabelina proslost (ras & emeri)(7 mb)
zoran radovic
 
Attestation de Travail SPC
Becket Georges Emman GBEDE
 
Dylan dog 07 zona sumraka
Sinisa Savicevic
 
12th standard Business Studies Marketing Management Project 2019-20 on KHAKHR...
Priyanshu206
 
ZMR Solar Water Heaters
ZMERLY & CO
 
Ad

Similar to Python Tutorial | Python Programming Language (20)

PPTX
Introduction python
Jumbo Techno e_Learning
 
PPTX
Introduction to python for Beginners
Sujith Kumar
 
PDF
intro.pptx (1).pdf
ANIKULSAIKH
 
PPTX
Python tutorial for beginners - Tib academy
TIB Academy
 
PPTX
Python Programming Draft PPT.pptx
LakshmiNarayanaReddy48
 
PPTX
Phython Programming Language
R.h. Himel
 
PPTX
python programminig and introduction.pptx
urvashipundir04
 
PPTX
introduction to python in computer graphics.pptx
urvashipundir04
 
PPTX
Python is a high-level, interpreted programming language that emphasizes read...
bikomaster9459
 
PPTX
Python is a high-level, interpreted programming language known for its simpli...
bikomaster9459
 
PPTX
Python is a high-level, interpreted programming language known for its simpli...
bikomaster9459
 
PPT
Python programming-2-2048 (30 files merged).ppt
pprince22982
 
PPT
Python programming notes all in one python ppt
pprince22982
 
PPTX
introduction to python in detail including .pptx
urvashipundir04
 
PPTX
Introduction to python
priyanshupanchal8
 
PDF
REPORT ON AUDIT COURSE PYTHON BY SANA 2.pdf
Sana Khan
 
PPTX
Python presentation by Monu Sharma
Mayank Sharma
 
PPT
1-ppt-python.ppt
ssusera99a83
 
PPTX
An Introduction To Python - Python, Print()
Blue Elephant Consulting
 
DOCX
Seminar report on python 3 course
HimanshuPanwar38
 
Introduction python
Jumbo Techno e_Learning
 
Introduction to python for Beginners
Sujith Kumar
 
intro.pptx (1).pdf
ANIKULSAIKH
 
Python tutorial for beginners - Tib academy
TIB Academy
 
Python Programming Draft PPT.pptx
LakshmiNarayanaReddy48
 
Phython Programming Language
R.h. Himel
 
python programminig and introduction.pptx
urvashipundir04
 
introduction to python in computer graphics.pptx
urvashipundir04
 
Python is a high-level, interpreted programming language that emphasizes read...
bikomaster9459
 
Python is a high-level, interpreted programming language known for its simpli...
bikomaster9459
 
Python is a high-level, interpreted programming language known for its simpli...
bikomaster9459
 
Python programming-2-2048 (30 files merged).ppt
pprince22982
 
Python programming notes all in one python ppt
pprince22982
 
introduction to python in detail including .pptx
urvashipundir04
 
Introduction to python
priyanshupanchal8
 
REPORT ON AUDIT COURSE PYTHON BY SANA 2.pdf
Sana Khan
 
Python presentation by Monu Sharma
Mayank Sharma
 
1-ppt-python.ppt
ssusera99a83
 
An Introduction To Python - Python, Print()
Blue Elephant Consulting
 
Seminar report on python 3 course
HimanshuPanwar38
 
Ad

More from anaveenkumar4 (14)

PPT
simulation based project presentation matlab Problem background Traditional s...
anaveenkumar4
 
PPT
04_python_functions.ppt You can define functions to provide the required func...
anaveenkumar4
 
PDF
Electric circuits are classified in several ways. A direct-current circuit ca...
anaveenkumar4
 
PPTX
MATLAB UNIT-III.pptx
anaveenkumar4
 
PPTX
project.pptx
anaveenkumar4
 
PPT
pump.ppt
anaveenkumar4
 
PPTX
RET UNIT-4.pptx
anaveenkumar4
 
PDF
13012-41797-1-RV.pdf
anaveenkumar4
 
PDF
SolarThermal.pdf
anaveenkumar4
 
PDF
1-s2.0-S1878029613000716-main.pdf
anaveenkumar4
 
PPTX
2_Off_Grid_Grid_Tied.pptx
anaveenkumar4
 
PPTX
TRAINING PROGRAMME ON MATLAB ASSOCIATE EXAM (1).pptx
anaveenkumar4
 
PPTX
Batch 6.pptx
anaveenkumar4
 
PDF
9-_Object_Oriented_Programming_Using_Python.pdf
anaveenkumar4
 
simulation based project presentation matlab Problem background Traditional s...
anaveenkumar4
 
04_python_functions.ppt You can define functions to provide the required func...
anaveenkumar4
 
Electric circuits are classified in several ways. A direct-current circuit ca...
anaveenkumar4
 
MATLAB UNIT-III.pptx
anaveenkumar4
 
project.pptx
anaveenkumar4
 
pump.ppt
anaveenkumar4
 
RET UNIT-4.pptx
anaveenkumar4
 
13012-41797-1-RV.pdf
anaveenkumar4
 
SolarThermal.pdf
anaveenkumar4
 
1-s2.0-S1878029613000716-main.pdf
anaveenkumar4
 
2_Off_Grid_Grid_Tied.pptx
anaveenkumar4
 
TRAINING PROGRAMME ON MATLAB ASSOCIATE EXAM (1).pptx
anaveenkumar4
 
Batch 6.pptx
anaveenkumar4
 
9-_Object_Oriented_Programming_Using_Python.pdf
anaveenkumar4
 

Recently uploaded (20)

PPTX
Color Model in Textile ( RGB, CMYK).pptx
auladhossain191
 
PPT
Ppt for engineering students application on field effect
lakshmi.ec
 
DOCX
SAR - EEEfdfdsdasdsdasdasdasdasdasdasdasda.docx
Kanimozhi676285
 
PDF
Cryptography and Information :Security Fundamentals
Dr. Madhuri Jawale
 
PPTX
database slide on modern techniques for optimizing database queries.pptx
aky52024
 
PPTX
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
PPTX
unit 3a.pptx material management. Chapter of operational management
atisht0104
 
PDF
The Effect of Artifact Removal from EEG Signals on the Detection of Epileptic...
Partho Prosad
 
PPTX
AgentX UiPath Community Webinar series - Delhi
RohitRadhakrishnan8
 
PDF
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
PPT
SCOPE_~1- technology of green house and poyhouse
bala464780
 
PPT
Lecture in network security and mobile computing
AbdullahOmar704132
 
PPTX
EE3303-EM-I 25.7.25 electrical machines.pptx
Nagen87
 
PDF
settlement FOR FOUNDATION ENGINEERS.pdf
Endalkazene
 
PDF
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
PPT
1. SYSTEMS, ROLES, AND DEVELOPMENT METHODOLOGIES.ppt
zilow058
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
Introduction to Data Science: data science process
ShivarkarSandip
 
PDF
Principles of Food Science and Nutritions
Dr. Yogesh Kumar Kosariya
 
PPTX
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
Color Model in Textile ( RGB, CMYK).pptx
auladhossain191
 
Ppt for engineering students application on field effect
lakshmi.ec
 
SAR - EEEfdfdsdasdsdasdasdasdasdasdasdasda.docx
Kanimozhi676285
 
Cryptography and Information :Security Fundamentals
Dr. Madhuri Jawale
 
database slide on modern techniques for optimizing database queries.pptx
aky52024
 
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
unit 3a.pptx material management. Chapter of operational management
atisht0104
 
The Effect of Artifact Removal from EEG Signals on the Detection of Epileptic...
Partho Prosad
 
AgentX UiPath Community Webinar series - Delhi
RohitRadhakrishnan8
 
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
SCOPE_~1- technology of green house and poyhouse
bala464780
 
Lecture in network security and mobile computing
AbdullahOmar704132
 
EE3303-EM-I 25.7.25 electrical machines.pptx
Nagen87
 
settlement FOR FOUNDATION ENGINEERS.pdf
Endalkazene
 
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
1. SYSTEMS, ROLES, AND DEVELOPMENT METHODOLOGIES.ppt
zilow058
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
Introduction to Data Science: data science process
ShivarkarSandip
 
Principles of Food Science and Nutritions
Dr. Yogesh Kumar Kosariya
 
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 

Python Tutorial | Python Programming Language

  • 2. Agenda What is Python…? Differences between program and scripting language History of Python Scope of Python Why do people use Python? Installing Python IDE Who uses python today What can I do with python A Sample Code Python code execution Running Python
  • 3. What is Python…? Python is a general purpose programming language that is often applied in scripting roles. So, Python is programming language as well as scripting language. Python is also called as Interpreted language
  • 4. Differences between program and scripting language Program a program is executed (i.e. the source is first compiled, and the result of that compilation is expected) A "program" in general, is a sequence of instructions written so that a computer can perform certain task. Scripting a script is interpreted A "script" is code written in a scripting language. A scripting language is nothing but a type of programming language in which we can write code to control another software application.
  • 5. History Invented in the Netherlands, early 90s by Guido van Rossum Python was conceived in the late 1980s and its implementation was started in December 1989 Guido V an Rossum is fan of ‘Monty Python’s Flying Circus’, this is a famous TV show in Netherlands Named after Monty Python Open sourced from the beginning
  • 6. Python’s Benevolent Dictator For Life “Python is an experiment in how much freedom program-mers need. Too much freedom and nobody can read another's code; too little and expressive-ness is endangered.” - Guido van Rossum
  • 7. Why was python created? "My original motivation for creating Python was the perceived need for a higher level language in the Amoeba [Operating Systems] project. I realized that the development of system Moreover, doing these things in the Bourne administration utilities in C was taking too long. shell wouldn'twork foravarietyof reasons. ... So, there was a need for a language that would bridge thegap between C and the shell” - GuidoVan Rossum
  • 8. Scope of Python Science - Bioinformatics SystemAdministration -Unix -Web logic -Web sphere Web Application Development -CGI -Jython – Servlets Testing scripts
  • 9. Why do people use Python…? The following primary factors cited by Python users seem to be these: Python is object-oriented Structure supports such concepts as polymorphism, operation overloading, and multiple inheritance. Indentation Indentation is one of the greatest future in Python. It's free (open source) Downloading and installing Python is free and easy Source code is easily accessible
  • 10. It's powerful - Dynamic typing - Built-in types and tools - Library utilities - Third party utilities (e.g. Numeric, NumPy, SciPy) -Automatic memory management It's portable - Python runs virtually every major platform used today -As long as you have a compatible Python interpreter installed, Python programs will run in exactly the same manner, irrespective of platform.
  • 11. It's mixable - Python can be linked to components written in other languages easily - Linking to fast, compiled code is useful to computationally intensive problems - - Python/C integration is quite common It's easy to use - No intermediate compile and link steps as in C/ C++ - Python programs are compiled automatically to an intermediate form called bytecode, which the interpreter then reads - This gives Python the development speed of an interpreter without the performance loss inherent in purely interpreted languages It's easy to learn - Structure and syntax are pretty intuitive and easy to grasp
  • 12. Installing Python Python is pre-installed on most Unix systems, including Linux and MAC OS X But for in Windows Operating Systems , user can download from the https://www.python.org/downloads/ - from the above link download latest version of python IDE and install, recent version is 3.4.1 but most of them uses version 2.7.7 only
  • 13. After installing the Python Ver#2.7.7, go to start menu then click on python 2.7 in that one you can select python (command line) it is prompt with >>>
  • 14. Who uses python today… Python is being applied in real revenue-generating products by real companies. For instance: Google makes extensive use of Python in its web search system, and employs Python’s creator. Intel, Cisco, Hewlett-Packard, Seagate, Qualcomm, and IBM use Python for hardware testing. ESRI uses Python as an end-user customization tool for its popular GIS mapping products. The Y ouTube video sharing service is largely written in Python
  • 15. What can I do with Python…? System programming Graphical User Interface Programming Internet Scripting Component Integration Database Programming Gaming, Images, XML , Robot and more
  • 16. A Sample Code # A comment. #Another one. x = 34 - 23 y = “Hello” z = 3.45 if z == 3.45 or y == “Hello”: x = x + 1 # String concat. y = y + “ World” print x print y
  • 17. Enough to understand the code Indentation matters to code meaning -Block structure indicated by indentation First assignment to a variable creates it - Variable types don’t need to be declared. -Python figures out the variable types on its own. Assignment is = and comparison is == For numbers + - * / % are as expected - Special use of + for string concatenation and % for string formatting (as in C’s printf) Logical operators are words (and, or, not) not symbols The basic printing command is print
  • 18. Python Code Execution Python’s traditional runtime execution model: source code you type is translated to byte code, which is then run by the Python Virtual Machine. Your code is automatically compiled, but then it is interpreted. Source code extension is .py Byte code extension is .pyc (compiled python code)
  • 19. Running Python Once you're inside the Python interpreter, type in commands at will. • Examples: >>> print 'Hello world' Hello world # Relevant output is displayed on subsequent lines without the >>> symbol >>> x = [0,1,2] # Quantities stored in memory are not displayed by default >>> x # If a quantity is stored in memory, typing its name will display it [0,1,2] >>> 2+3 5