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

PPTX
Anxiolytics and hypnotics
PPTX
Diuretics
PPT
Cholinergic drugs
PPTX
Presentation On Proton Pump Inhibitor
PPTX
Introduction to python for Beginners
PDF
intro.pptx (1).pdf
PPTX
Python tutorial for beginners - Tib academy
PPTX
Phython Programming Language
Anxiolytics and hypnotics
Diuretics
Cholinergic drugs
Presentation On Proton Pump Inhibitor
Introduction to python for Beginners
intro.pptx (1).pdf
Python tutorial for beginners - Tib academy
Phython Programming Language

Similar to Python Tutorial | Python Programming Language (20)

PPTX
Python Programming Draft PPT.pptx
PPTX
python programminig and introduction.pptx
PPTX
introduction to python in computer graphics.pptx
PPTX
introduction to python in detail including .pptx
PPTX
Presentation on python
PPTX
Python is a high-level, interpreted programming language known for its simpli...
PPTX
Python is a high-level, interpreted programming language known for its simpli...
PPTX
Python is a high-level, interpreted programming language that emphasizes read...
PPTX
Introduction to the Python
PDF
session5-Getting stated with Python.pdf
PPT
Cmpe202 01 Research
PPTX
university notes Lecture - 1 (Python) E-Notes.pptx
PPTX
Lecture - 1 (Python) E-Notes.pptx important
PPTX
Python learning notes for freshers and also beginners.
PPTX
Python basic
PPTX
python unit2.pptx
PPTX
Introduction-to-Python-Programming1.pptx
PDF
Python_final_print_vison_academy_9822506209.pdf
PPTX
DSA Presentation.pptx pptttttttttttttttt
PPTX
Introduction to python
Python Programming Draft PPT.pptx
python programminig and introduction.pptx
introduction to python in computer graphics.pptx
introduction to python in detail including .pptx
Presentation on python
Python is a high-level, interpreted programming language known for its simpli...
Python is a high-level, interpreted programming language known for its simpli...
Python is a high-level, interpreted programming language that emphasizes read...
Introduction to the Python
session5-Getting stated with Python.pdf
Cmpe202 01 Research
university notes Lecture - 1 (Python) E-Notes.pptx
Lecture - 1 (Python) E-Notes.pptx important
Python learning notes for freshers and also beginners.
Python basic
python unit2.pptx
Introduction-to-Python-Programming1.pptx
Python_final_print_vison_academy_9822506209.pdf
DSA Presentation.pptx pptttttttttttttttt
Introduction to python
Ad

More from anaveenkumar4 (14)

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

Recently uploaded (20)

PPTX
Lecture Notes Electrical Wiring System Components
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Digital Logic Computer Design lecture notes
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
composite construction of structures.pdf
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
PPT on Performance Review to get promotions
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
Well-logging-methods_new................
PPT
Project quality management in manufacturing
PPT
Mechanical Engineering MATERIALS Selection
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Lecture Notes Electrical Wiring System Components
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
R24 SURVEYING LAB MANUAL for civil enggi
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Digital Logic Computer Design lecture notes
bas. eng. economics group 4 presentation 1.pptx
composite construction of structures.pdf
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Automation-in-Manufacturing-Chapter-Introduction.pdf
Foundation to blockchain - A guide to Blockchain Tech
PPT on Performance Review to get promotions
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Model Code of Practice - Construction Work - 21102022 .pdf
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Well-logging-methods_new................
Project quality management in manufacturing
Mechanical Engineering MATERIALS Selection
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx

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