SlideShare a Scribd company logo
What We Giveyou?
2
• What is Python...?
• Differences between program and scripting language
• History of Python
• Scope of Python
• What can I do with python
• Who uses python today
• Why do people use Python?
• Installing Python IDE
• A Sample Code
• Python code execution
• Running Python
• Python Basic(Variable, Strings, Data types etc.)
What is Python ...?
3
• 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 pr ogram and
scripting language
4
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
Scripti ng
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
Netherlands, early
5
• Invented in
the Rossum
90s by Guido van
• Python was conceived in the late
1980s implementation was started in
December 1989
and its
• Guido Van 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
6
"Python is an experiment in
much freedom programmers
how
need.
Too much freedom and nobody can
read another's code; too little and
expressiveness is endangered.''
- Guido van Rossum
Why was python
created ?
7
"My original motivation for creating Python was
the in
the
perceivedneed for a higher level
Amoeba [Operating Systems] project.
language
Moreover, doing these things in the
wouldn't work for a va riety of reasons. ...
So, there was a need for a
Bourne shell
la
nguage
that
would bridge the gap between C and the shell"
- Guido Va n Rossum
I realized
that
the
development of system
administration utilities in C was taking too long.
Scope of Python
8
• Science
- Bioinformatics
• System Administration
-Unix
-Web logic
-Web sphere
• Web Application Development
-CGI
-Jython - Servlets
• Testing scripts
What can I do with Python ...?
9
• Systetn progratntning
• Graphical User Interface Progratntning
• Internet Scripting
• Cotnponent Integration
• Database Progratntning
• Gatning, Itnages, XML , Robot and tnore
Who usespython today ...
10
• 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 YouTube video sharing service is
largely written in Python
Why dopeople use Python ...?
11
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.
•It's free (open source)
Downloadingand 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.
12
Insta lling Python
13
• 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
14
python 2.7 in that one
you can select
.
(command line) it IS
prompt with >>>
python
iTunes Lenovo Maintena nce
Memeo
Microsoft Off ice Microsoft
Silverlight MyPC Backu p
Notepad+ +
ooVoo PriceMcter
Privacy SafeGuard Protected
Search Python 2.7
i' IDLE (Python GUI)
i' Mod ule Docs
P' PythonCcom_m_a_nd
line)
Python Ma nuals Uninstall
Python
Resolver 2.2 Skype
SmilcysWeLove for IE
Bac
k
Pytho
[GCC 4.0.
Type copy .
re informa
> I
1
1:33 : 8 )
n
o mo
15
. c .
I ft C ed .t $ n Or
Running Python
16
Once you're inside the Python interpreter, type in commands at will.
•Examples:
>>> print 'Hello world' Hello world
Python Code Execution
17
• 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.
Sour
ce
Byte
code
Runtim
e
.....-..
PVM
,--
-
... ..
. ....
,,
I I



t
.....-..
'
·
I '
'


I'
I
I
#
.
.
,
.
.
,
---
---
...
m.py
Source code extension is .py
Byte code extension is .pyc (compiled python code)
MATH(OPERATOR) IN PYTHON
.
. .
. .
.
Math
19
Try typing this into Code:
>>> print 3 + 12
15
>>> print 12 - 3
9
>>> print 9 + 5 - 15 + 12
11
Operators: add: + subtract: -
Note: don't type the arrows >>> !
Math
Rule: If you want Python to answer in floats, you have to talk
to it in floats.
20
More operators:
divide: I
multiply: *
>>> print 3 * 12 36
>>> print 12 I 3 4
>>> print 11 I 3 3
>>> print 12.0 I 3.0 4.0
>>> print 11.0 I 3.0 3.66
Math
21
Practice:
>>> print False < True True
>>> print 2 < 3 True
>>> print 2 <= 2 False
>>> print 3 > 2 True
>>> print 2
.'
=
3 True
- - -
-
22
STRINGS IN PYTHON
Strings
23
Examples:
Try typing one without quotes:
What's the result?
>>> "It's a beautiful
day!"
>>> "Goodbye, cruel
world.
"
>>> Aggies
>>> "Aggies "
>>> "Rice fight, never
die!"
>>> "3 + 2''
Strings
24
String operators:
concatenation: +
multiplication: *
Try concatenating:
Try multiplying:
>>> print "Hello "
+
" " +
>>>
250
"world!
"
print "HAHA" *
- - -
-
25
VARIABLES IN PYTHON
Variable
26
Create a Variable:
>>>headmaster="Dumbledore"
>>>print headmaster
'Dumbledore'
Assigning a New Value:
>>>headma ster="Hardcastle"
>>>print headmaster 'Hardcastle'
DATA TYPES IN PYTHON
Data Type:
28
Python has many native data types. Here are the important ones:
Booleans are either True or False.
Numbers can be integers (1 and 2L floats (1.1and 1.2), fractions
(1/2 and 2/3), or even complex numbers.
Strings are sequences of Unicode characters, e.g. an HTML document.
Bytes and byte arrays,e.g. a JPEG image file. Lists are ordered
sequences of values.
Tuples are ordered,immutable sequences of va lues. Sets are
unordered bags of values.
Example:
29
String
Integer
Float
List
''Wh oop !''
42
3.14159
["John",
"Paul","George","Ringo"]
Python can tell us about types using the type()
function:
>>> print type("Whoop! ")
<type 'str'>
- - -
-
30
LIST: DATA
TYPE
List:
31
The list is a most versatile Data type ava ilable in Python which
can be written as a list of comma-sepa rated values (items)
between square brackets. Important thing about a list is that
items in a list need not be of the same type.
Example:
listl = ['physics', 'chemistry', 1997,2000];
list2 = [1, 2,3,4,5 ];

More Related Content

Similar to Python programming notes all in one python ppt (20)

Python Tutorial | Python Programming Language
Python Tutorial | Python Programming LanguagePython Tutorial | Python Programming Language
Python Tutorial | Python Programming Language
anaveenkumar4
 
intro.pptx (1).pdf
intro.pptx (1).pdfintro.pptx (1).pdf
intro.pptx (1).pdf
ANIKULSAIKH
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
R.h. Himel
 
Python Programming Draft PPT.pptx
Python Programming Draft PPT.pptxPython Programming Draft PPT.pptx
Python Programming Draft PPT.pptx
LakshmiNarayanaReddy48
 
05 python.pdf
05 python.pdf05 python.pdf
05 python.pdf
SugumarSarDurai
 
Python for IoT CoE.pptx KDOJWIHJNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Python for IoT CoE.pptx KDOJWIHJNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPython for IoT CoE.pptx KDOJWIHJNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Python for IoT CoE.pptx KDOJWIHJNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
SalihaBathool
 
جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
Mohammad Reza Kamalifard
 
python presentation
python presentationpython presentation
python presentation
VaibhavMawal
 
Introduction to Python.pdf
Introduction to Python.pdfIntroduction to Python.pdf
Introduction to Python.pdf
Rahul Mogal
 
Python 1
Python 1Python 1
Python 1
Jainul Musani
 
DSA Day 2 PPT.pdf
DSA Day 2 PPT.pdfDSA Day 2 PPT.pdf
DSA Day 2 PPT.pdf
AkramMohammad28
 
python programminig and introduction.pptx
python programminig and introduction.pptxpython programminig and introduction.pptx
python programminig and introduction.pptx
urvashipundir04
 
20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf
20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf
20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf
abinayas958164
 
20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf
20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf
20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf
abinayas958164
 
introduction to python in computer graphics.pptx
introduction to python in computer graphics.pptxintroduction to python in computer graphics.pptx
introduction to python in computer graphics.pptx
urvashipundir04
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
MohammadSamiuddin10
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
MohammadSamiuddin10
 
Prerequisite for Artificial Intelligence.pptx
Prerequisite for Artificial Intelligence.pptxPrerequisite for Artificial Intelligence.pptx
Prerequisite for Artificial Intelligence.pptx
krishan8018
 
AI_Day2_l it is to be of this ai ppt for anyone to be to out of thislearn.pptx
AI_Day2_l it is to be of this ai ppt for anyone to be to out of thislearn.pptxAI_Day2_l it is to be of this ai ppt for anyone to be to out of thislearn.pptx
AI_Day2_l it is to be of this ai ppt for anyone to be to out of thislearn.pptx
Neelkaranbind
 
Python Programming
Python ProgrammingPython Programming
Python Programming
WahidKamarullah
 
Python Tutorial | Python Programming Language
Python Tutorial | Python Programming LanguagePython Tutorial | Python Programming Language
Python Tutorial | Python Programming Language
anaveenkumar4
 
intro.pptx (1).pdf
intro.pptx (1).pdfintro.pptx (1).pdf
intro.pptx (1).pdf
ANIKULSAIKH
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
R.h. Himel
 
Python for IoT CoE.pptx KDOJWIHJNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Python for IoT CoE.pptx KDOJWIHJNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNPython for IoT CoE.pptx KDOJWIHJNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Python for IoT CoE.pptx KDOJWIHJNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
SalihaBathool
 
جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
Mohammad Reza Kamalifard
 
python presentation
python presentationpython presentation
python presentation
VaibhavMawal
 
Introduction to Python.pdf
Introduction to Python.pdfIntroduction to Python.pdf
Introduction to Python.pdf
Rahul Mogal
 
python programminig and introduction.pptx
python programminig and introduction.pptxpython programminig and introduction.pptx
python programminig and introduction.pptx
urvashipundir04
 
20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf
20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf
20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf
abinayas958164
 
20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf
20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf
20210517-PYTHON AI&DS PROGRAMMING NOTES.pdf
abinayas958164
 
introduction to python in computer graphics.pptx
introduction to python in computer graphics.pptxintroduction to python in computer graphics.pptx
introduction to python in computer graphics.pptx
urvashipundir04
 
Prerequisite for Artificial Intelligence.pptx
Prerequisite for Artificial Intelligence.pptxPrerequisite for Artificial Intelligence.pptx
Prerequisite for Artificial Intelligence.pptx
krishan8018
 
AI_Day2_l it is to be of this ai ppt for anyone to be to out of thislearn.pptx
AI_Day2_l it is to be of this ai ppt for anyone to be to out of thislearn.pptxAI_Day2_l it is to be of this ai ppt for anyone to be to out of thislearn.pptx
AI_Day2_l it is to be of this ai ppt for anyone to be to out of thislearn.pptx
Neelkaranbind
 

Recently uploaded (20)

Software Engineering Process, Notation & Tools Introduction - Part 4
Software Engineering Process, Notation & Tools Introduction - Part 4Software Engineering Process, Notation & Tools Introduction - Part 4
Software Engineering Process, Notation & Tools Introduction - Part 4
Gaurav Sharma
 
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
BradBedford3
 
Plooma is a writing platform to plan, write, and shape books your way
Plooma is a writing platform to plan, write, and shape books your wayPlooma is a writing platform to plan, write, and shape books your way
Plooma is a writing platform to plan, write, and shape books your way
Plooma
 
Integration Ignited Redefining Event-Driven Architecture at Wix - EventCentric
Integration Ignited Redefining Event-Driven Architecture at Wix - EventCentricIntegration Ignited Redefining Event-Driven Architecture at Wix - EventCentric
Integration Ignited Redefining Event-Driven Architecture at Wix - EventCentric
Natan Silnitsky
 
Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)
VICTOR MAESTRE RAMIREZ
 
IBM Rational Unified Process For Software Engineering - Introduction
IBM Rational Unified Process For Software Engineering - IntroductionIBM Rational Unified Process For Software Engineering - Introduction
IBM Rational Unified Process For Software Engineering - Introduction
Gaurav Sharma
 
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
Insurance Tech Services
 
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
WSO2
 
Top 11 Fleet Management Software Providers in 2025 (2).pdf
Top 11 Fleet Management Software Providers in 2025 (2).pdfTop 11 Fleet Management Software Providers in 2025 (2).pdf
Top 11 Fleet Management Software Providers in 2025 (2).pdf
Trackobit
 
COBOL Programming with VSCode - IBM Certificate
COBOL Programming with VSCode - IBM CertificateCOBOL Programming with VSCode - IBM Certificate
COBOL Programming with VSCode - IBM Certificate
VICTOR MAESTRE RAMIREZ
 
How Insurance Policy Management Software Streamlines Operations
How Insurance Policy Management Software Streamlines OperationsHow Insurance Policy Management Software Streamlines Operations
How Insurance Policy Management Software Streamlines Operations
Insurance Tech Services
 
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Alluxio, Inc.
 
Providing Better Biodiversity Through Better Data
Providing Better Biodiversity Through Better DataProviding Better Biodiversity Through Better Data
Providing Better Biodiversity Through Better Data
Safe Software
 
The Future of Open Source Reporting Best Alternatives to Jaspersoft.pdf
The Future of Open Source Reporting Best Alternatives to Jaspersoft.pdfThe Future of Open Source Reporting Best Alternatives to Jaspersoft.pdf
The Future of Open Source Reporting Best Alternatives to Jaspersoft.pdf
Varsha Nayak
 
Best Inbound Call Tracking Software for Small Businesses
Best Inbound Call Tracking Software for Small BusinessesBest Inbound Call Tracking Software for Small Businesses
Best Inbound Call Tracking Software for Small Businesses
TheTelephony
 
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps CyclesFrom Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
Marjukka Niinioja
 
FME for Climate Data: Turning Big Data into Actionable Insights
FME for Climate Data: Turning Big Data into Actionable InsightsFME for Climate Data: Turning Big Data into Actionable Insights
FME for Climate Data: Turning Big Data into Actionable Insights
Safe Software
 
Automating Map Production With FME and Python
Automating Map Production With FME and PythonAutomating Map Production With FME and Python
Automating Map Production With FME and Python
Safe Software
 
GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?
felipeceotto
 
Revolutionize Your Insurance Workflow with Claims Management Software
Revolutionize Your Insurance Workflow with Claims Management SoftwareRevolutionize Your Insurance Workflow with Claims Management Software
Revolutionize Your Insurance Workflow with Claims Management Software
Insurance Tech Services
 
Software Engineering Process, Notation & Tools Introduction - Part 4
Software Engineering Process, Notation & Tools Introduction - Part 4Software Engineering Process, Notation & Tools Introduction - Part 4
Software Engineering Process, Notation & Tools Introduction - Part 4
Gaurav Sharma
 
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
BradBedford3
 
Plooma is a writing platform to plan, write, and shape books your way
Plooma is a writing platform to plan, write, and shape books your wayPlooma is a writing platform to plan, write, and shape books your way
Plooma is a writing platform to plan, write, and shape books your way
Plooma
 
Integration Ignited Redefining Event-Driven Architecture at Wix - EventCentric
Integration Ignited Redefining Event-Driven Architecture at Wix - EventCentricIntegration Ignited Redefining Event-Driven Architecture at Wix - EventCentric
Integration Ignited Redefining Event-Driven Architecture at Wix - EventCentric
Natan Silnitsky
 
Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)
VICTOR MAESTRE RAMIREZ
 
IBM Rational Unified Process For Software Engineering - Introduction
IBM Rational Unified Process For Software Engineering - IntroductionIBM Rational Unified Process For Software Engineering - Introduction
IBM Rational Unified Process For Software Engineering - Introduction
Gaurav Sharma
 
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
Insurance Tech Services
 
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
WSO2
 
Top 11 Fleet Management Software Providers in 2025 (2).pdf
Top 11 Fleet Management Software Providers in 2025 (2).pdfTop 11 Fleet Management Software Providers in 2025 (2).pdf
Top 11 Fleet Management Software Providers in 2025 (2).pdf
Trackobit
 
COBOL Programming with VSCode - IBM Certificate
COBOL Programming with VSCode - IBM CertificateCOBOL Programming with VSCode - IBM Certificate
COBOL Programming with VSCode - IBM Certificate
VICTOR MAESTRE RAMIREZ
 
How Insurance Policy Management Software Streamlines Operations
How Insurance Policy Management Software Streamlines OperationsHow Insurance Policy Management Software Streamlines Operations
How Insurance Policy Management Software Streamlines Operations
Insurance Tech Services
 
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Alluxio, Inc.
 
Providing Better Biodiversity Through Better Data
Providing Better Biodiversity Through Better DataProviding Better Biodiversity Through Better Data
Providing Better Biodiversity Through Better Data
Safe Software
 
The Future of Open Source Reporting Best Alternatives to Jaspersoft.pdf
The Future of Open Source Reporting Best Alternatives to Jaspersoft.pdfThe Future of Open Source Reporting Best Alternatives to Jaspersoft.pdf
The Future of Open Source Reporting Best Alternatives to Jaspersoft.pdf
Varsha Nayak
 
Best Inbound Call Tracking Software for Small Businesses
Best Inbound Call Tracking Software for Small BusinessesBest Inbound Call Tracking Software for Small Businesses
Best Inbound Call Tracking Software for Small Businesses
TheTelephony
 
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps CyclesFrom Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
Marjukka Niinioja
 
FME for Climate Data: Turning Big Data into Actionable Insights
FME for Climate Data: Turning Big Data into Actionable InsightsFME for Climate Data: Turning Big Data into Actionable Insights
FME for Climate Data: Turning Big Data into Actionable Insights
Safe Software
 
Automating Map Production With FME and Python
Automating Map Production With FME and PythonAutomating Map Production With FME and Python
Automating Map Production With FME and Python
Safe Software
 
GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?
felipeceotto
 
Revolutionize Your Insurance Workflow with Claims Management Software
Revolutionize Your Insurance Workflow with Claims Management SoftwareRevolutionize Your Insurance Workflow with Claims Management Software
Revolutionize Your Insurance Workflow with Claims Management Software
Insurance Tech Services
 
Ad

Python programming notes all in one python ppt

  • 1. What We Giveyou? 2 • What is Python...? • Differences between program and scripting language • History of Python • Scope of Python • What can I do with python • Who uses python today • Why do people use Python? • Installing Python IDE • A Sample Code • Python code execution • Running Python • Python Basic(Variable, Strings, Data types etc.)
  • 2. What is Python ...? 3 • 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
  • 3. Differences between pr ogram and scripting language 4 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 Scripti ng 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. History Netherlands, early 5 • Invented in the Rossum 90s by Guido van • Python was conceived in the late 1980s implementation was started in December 1989 and its • Guido Van 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
  • 5. Python S Benevolent Dictator For Life 6 "Python is an experiment in much freedom programmers how need. Too much freedom and nobody can read another's code; too little and expressiveness is endangered.'' - Guido van Rossum
  • 6. Why was python created ? 7 "My original motivation for creating Python was the in the perceivedneed for a higher level Amoeba [Operating Systems] project. language Moreover, doing these things in the wouldn't work for a va riety of reasons. ... So, there was a need for a Bourne shell la nguage that would bridge the gap between C and the shell" - Guido Va n Rossum I realized that the development of system administration utilities in C was taking too long.
  • 7. Scope of Python 8 • Science - Bioinformatics • System Administration -Unix -Web logic -Web sphere • Web Application Development -CGI -Jython - Servlets • Testing scripts
  • 8. What can I do with Python ...? 9 • Systetn progratntning • Graphical User Interface Progratntning • Internet Scripting • Cotnponent Integration • Database Progratntning • Gatning, Itnages, XML , Robot and tnore
  • 9. Who usespython today ... 10 • 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 YouTube video sharing service is largely written in Python
  • 10. Why dopeople use Python ...? 11 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. •It's free (open source) Downloadingand installing Python is free and easy Source code is easily accessible
  • 11. • 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. 12
  • 12. Insta lling Python 13 • 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 14 python 2.7 in that one you can select . (command line) it IS prompt with >>> python iTunes Lenovo Maintena nce Memeo Microsoft Off ice Microsoft Silverlight MyPC Backu p Notepad+ + ooVoo PriceMcter Privacy SafeGuard Protected Search Python 2.7 i' IDLE (Python GUI) i' Mod ule Docs P' PythonCcom_m_a_nd line) Python Ma nuals Uninstall Python Resolver 2.2 Skype SmilcysWeLove for IE Bac k
  • 14. Pytho [GCC 4.0. Type copy . re informa > I 1 1:33 : 8 ) n o mo 15 . c . I ft C ed .t $ n Or
  • 15. Running Python 16 Once you're inside the Python interpreter, type in commands at will. •Examples: >>> print 'Hello world' Hello world
  • 16. Python Code Execution 17 • 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. Sour ce Byte code Runtim e .....-.. PVM ,-- - ... .. . .... ,, I I t .....-.. ' · I ' ' I' I I # . . , . . , --- --- ... m.py Source code extension is .py Byte code extension is .pyc (compiled python code)
  • 18. Math 19 Try typing this into Code: >>> print 3 + 12 15 >>> print 12 - 3 9 >>> print 9 + 5 - 15 + 12 11 Operators: add: + subtract: - Note: don't type the arrows >>> !
  • 19. Math Rule: If you want Python to answer in floats, you have to talk to it in floats. 20 More operators: divide: I multiply: * >>> print 3 * 12 36 >>> print 12 I 3 4 >>> print 11 I 3 3 >>> print 12.0 I 3.0 4.0 >>> print 11.0 I 3.0 3.66
  • 20. Math 21 Practice: >>> print False < True True >>> print 2 < 3 True >>> print 2 <= 2 False >>> print 3 > 2 True >>> print 2 .' = 3 True
  • 21. - - - - 22 STRINGS IN PYTHON
  • 22. Strings 23 Examples: Try typing one without quotes: What's the result? >>> "It's a beautiful day!" >>> "Goodbye, cruel world. " >>> Aggies >>> "Aggies " >>> "Rice fight, never die!" >>> "3 + 2''
  • 23. Strings 24 String operators: concatenation: + multiplication: * Try concatenating: Try multiplying: >>> print "Hello " + " " + >>> 250 "world! " print "HAHA" *
  • 24. - - - - 25 VARIABLES IN PYTHON
  • 25. Variable 26 Create a Variable: >>>headmaster="Dumbledore" >>>print headmaster 'Dumbledore' Assigning a New Value: >>>headma ster="Hardcastle" >>>print headmaster 'Hardcastle'
  • 26. DATA TYPES IN PYTHON
  • 27. Data Type: 28 Python has many native data types. Here are the important ones: Booleans are either True or False. Numbers can be integers (1 and 2L floats (1.1and 1.2), fractions (1/2 and 2/3), or even complex numbers. Strings are sequences of Unicode characters, e.g. an HTML document. Bytes and byte arrays,e.g. a JPEG image file. Lists are ordered sequences of values. Tuples are ordered,immutable sequences of va lues. Sets are unordered bags of values.
  • 28. Example: 29 String Integer Float List ''Wh oop !'' 42 3.14159 ["John", "Paul","George","Ringo"] Python can tell us about types using the type() function: >>> print type("Whoop! ") <type 'str'>
  • 29. - - - - 30 LIST: DATA TYPE
  • 30. List: 31 The list is a most versatile Data type ava ilable in Python which can be written as a list of comma-sepa rated values (items) between square brackets. Important thing about a list is that items in a list need not be of the same type. Example: listl = ['physics', 'chemistry', 1997,2000]; list2 = [1, 2,3,4,5 ];