SlideShare ist ein Scribd-Unternehmen logo
1 von 19
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
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.
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
Scope of Python
Science
- Bioinformatics
SystemAdministration
-Unix
-Web logic
-Web sphere
Web Application Development
-CGI
-Jython – Servlets
Testing scripts
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.
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
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
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
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)
What is Python…?
• Python is a general purpose high-level programming language
that is often applied in scripting roles.
• Python is programming language as well as scripting language.
• Dynamic typed.
• Source can be compiled or run just-in-time as Interpreted
language.
• Similar to perl, tcl, ruby.
• Open source and community driven.
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
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
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 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
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 >>>
What can I do with Python…?
System programming
Graphical User Interface Programming
Internet Scripting
Component Integration
Database Programming
Gaming, Images, XML , Robot and more
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
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

Weitere ähnliche Inhalte

Ähnlich wie Python Programming Draft PPT.pptx

Ähnlich wie Python Programming Draft PPT.pptx (20)

POWER OF PYTHON PROGRAMMING LANGUAGE
POWER OF PYTHON PROGRAMMING LANGUAGE POWER OF PYTHON PROGRAMMING LANGUAGE
POWER OF PYTHON PROGRAMMING LANGUAGE
 
Python basic
Python basicPython basic
Python basic
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
INTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHONINTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHON
 
Basic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptxBasic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptx
 
introduction to Python (for beginners)
introduction to Python (for beginners)introduction to Python (for beginners)
introduction to Python (for beginners)
 
session5-Getting stated with Python.pdf
session5-Getting stated with Python.pdfsession5-Getting stated with Python.pdf
session5-Getting stated with Python.pdf
 
Chapter - 1.pptx
Chapter - 1.pptxChapter - 1.pptx
Chapter - 1.pptx
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Cmpe202 01 Research
Cmpe202 01 ResearchCmpe202 01 Research
Cmpe202 01 Research
 
python unit2.pptx
python unit2.pptxpython unit2.pptx
python unit2.pptx
 
Research paper on python by Rj
Research paper on python by RjResearch paper on python by Rj
Research paper on python by Rj
 
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdf
 
Python_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdfPython_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdf
 
Simple calulator using GUI tkinter.pptx
Simple calulator using GUI tkinter.pptxSimple calulator using GUI tkinter.pptx
Simple calulator using GUI tkinter.pptx
 
python programming.pptx
python programming.pptxpython programming.pptx
python programming.pptx
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To Python
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
ppt summer training ug.pptx
ppt summer training ug.pptxppt summer training ug.pptx
ppt summer training ug.pptx
 

Mehr von LakshmiNarayanaReddy48 (8)

Bio-SENSORS.pptx
Bio-SENSORS.pptxBio-SENSORS.pptx
Bio-SENSORS.pptx
 
Automotive Sensors.pptx
Automotive Sensors.pptxAutomotive Sensors.pptx
Automotive Sensors.pptx
 
Veterinary Research-Research Perspective.pptx
Veterinary Research-Research Perspective.pptxVeterinary Research-Research Perspective.pptx
Veterinary Research-Research Perspective.pptx
 
LabVIEW.pptx
LabVIEW.pptxLabVIEW.pptx
LabVIEW.pptx
 
Temp - PPT - 02.pptx
Temp - PPT - 02.pptxTemp - PPT - 02.pptx
Temp - PPT - 02.pptx
 
Biosensors - Lectures 2022-06-26.pdf
Biosensors - Lectures  2022-06-26.pdfBiosensors - Lectures  2022-06-26.pdf
Biosensors - Lectures 2022-06-26.pdf
 
Biosensors 2022-06-26.pptx
Biosensors 2022-06-26.pptxBiosensors 2022-06-26.pptx
Biosensors 2022-06-26.pptx
 
Temp - PPT - 01.pptx
Temp - PPT - 01.pptxTemp - PPT - 01.pptx
Temp - PPT - 01.pptx
 

Kürzlich hochgeladen

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Kürzlich hochgeladen (20)

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

Python Programming Draft PPT.pptx

  • 1.
  • 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. 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.
  • 4. 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
  • 5. Scope of Python Science - Bioinformatics SystemAdministration -Unix -Web logic -Web sphere Web Application Development -CGI -Jython – Servlets Testing scripts
  • 6. 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.
  • 7. 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
  • 8. 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
  • 9. 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
  • 10. 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)
  • 11. What is Python…? • Python is a general purpose high-level programming language that is often applied in scripting roles. • Python is programming language as well as scripting language. • Dynamic typed. • Source can be compiled or run just-in-time as Interpreted language. • Similar to perl, tcl, ruby. • Open source and community driven.
  • 12. 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
  • 13. 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
  • 14. 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
  • 15. 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
  • 16. 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 >>>
  • 17. What can I do with Python…? System programming Graphical User Interface Programming Internet Scripting Component Integration Database Programming Gaming, Images, XML , Robot and more
  • 18. 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
  • 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