SlideShare une entreprise Scribd logo
1  sur  9
PYTHON
“PYTHON IS AN EXPERIMENT IN HOW MUCH
FREEDOM PROGRAMMERS NEED. TOO MUCH
FREEDOM AND NOBODY CAN READ
ANOTHER'S CODE; TOO LITTLE AND
EXPRESSIVE-NESS IS ENDANGERED.”
- GUIDO VAN ROSSUM
 Invented in the Netherlands, early 90s by Guido van Rossum
 Named after Monty Python
 Open sourced from the beginning
 Considered a scripting language, but is much more
 Scalable, object oriented and functional from the beginning
 Used by Google from the beginning
 Increasingly popular
Brief History of Python
http://docs.python.org/
Python is pre-installed on most Unix
systems, including Linux and MAC OS X
The pre-installed version may not be
the most recent one (2.6.2 and 3.1.1 as
of Sept 09)
Download from
http://python.org/download/
Python comes with a large library of
standard modules
Editing Python in Emacs
Emacs python-mode has good support
for editing Python, enabled enabled
by default for .py files
Features: completion, symbol help,
eldoc, and inferior interpreter shell, etc.
Running Programs on UNIX
 Call python program via the python interpreter
% python fact.py
 Make a python file directly executable by Adding the
 appropriate path to your python interpreter as the first line of your
file
#!/usr/bin/python
 Making the file executable
% chmod a+x fact.py
 Invoking file from Unix command line
% fact.py
Example script :
#! /usr/bin/python
def fact(x):
"""Returns the factorial of its argument, assumed to be a posint"""
if x == 0:
return 1
return x * fact(x - 1)
print
print ’N fact(N)’
print "---------"
for n in range(10):
print n, fact(n)
Python Scripts :
 When you call a python program from the command line the
interpreter evaluates each expression in the file
 Familiar mechanisms are used to provide command line arguments
and/or redirect input and output
 Python also has mechanisms to allow a python program to act both
as a script and as a module to be imported and used by another
python program
Results:
python> python email0.py <email.txt
bill@msft.com
gates@microsoft.com
steve@apple.com
bill@msft.com
python>
we provide online and classroom training for PYTHON
For more details
www.asit.amcsquare.com
Wise Machines India Pvt Ltd
# 360, Sri Sai Padma Arcade,
Varthur Main Road,
Ramagondanahalli,
Whitefield ,Bangalore – 560066
9740377262
* we also have branches in Hyderabad and Chennai

Contenu connexe

Tendances

Tendances (20)

Building custom kernels for IPython
Building custom kernels for IPythonBuilding custom kernels for IPython
Building custom kernels for IPython
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
PenTest using Python By Purna Chander
PenTest using Python By Purna ChanderPenTest using Python By Purna Chander
PenTest using Python By Purna Chander
 
Python - basics
Python - basicsPython - basics
Python - basics
 
Python and Flask introduction for my classmates Презентация и введение в flask
Python and Flask introduction for my classmates Презентация и введение в flaskPython and Flask introduction for my classmates Презентация и введение в flask
Python and Flask introduction for my classmates Презентация и введение в flask
 
Go for Rubyists
Go for RubyistsGo for Rubyists
Go for Rubyists
 
An Empirical Study of Identical Function Clones in CRAN
An Empirical Study of Identical Function Clones in CRANAn Empirical Study of Identical Function Clones in CRAN
An Empirical Study of Identical Function Clones in CRAN
 
IHTM Python PCEP Introduction to Python
IHTM Python PCEP Introduction to PythonIHTM Python PCEP Introduction to Python
IHTM Python PCEP Introduction to Python
 
java copy file program
java copy file programjava copy file program
java copy file program
 
C++ prgms io file unit 7
C++ prgms io file unit 7C++ prgms io file unit 7
C++ prgms io file unit 7
 
Consider the following BNF grammar: implement a recursive descent parser tha...
Consider the following BNF grammar:  implement a recursive descent parser tha...Consider the following BNF grammar:  implement a recursive descent parser tha...
Consider the following BNF grammar: implement a recursive descent parser tha...
 
Let's Go-lang
Let's Go-langLet's Go-lang
Let's Go-lang
 
Python001
Python001Python001
Python001
 
Torch7 and ConvNet
Torch7 and ConvNetTorch7 and ConvNet
Torch7 and ConvNet
 
Django district pip, virtualenv, virtualenv wrapper & more
Django district  pip, virtualenv, virtualenv wrapper & moreDjango district  pip, virtualenv, virtualenv wrapper & more
Django district pip, virtualenv, virtualenv wrapper & more
 
Torch intro
Torch introTorch intro
Torch intro
 
Introduction to Python for Bioinformatics
Introduction to Python for BioinformaticsIntroduction to Python for Bioinformatics
Introduction to Python for Bioinformatics
 
PyParis2017 / Tutorial transcript - Function-as-a-service : a pythonic perspe...
PyParis2017 / Tutorial transcript - Function-as-a-service : a pythonic perspe...PyParis2017 / Tutorial transcript - Function-as-a-service : a pythonic perspe...
PyParis2017 / Tutorial transcript - Function-as-a-service : a pythonic perspe...
 
Hosts fpt
Hosts fptHosts fpt
Hosts fpt
 
Python Intro
Python IntroPython Intro
Python Intro
 

Similaire à Learn PYTHON at ASIT

Similaire à Learn PYTHON at ASIT (20)

Python tutorial
Python tutorialPython tutorial
Python tutorial
 
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
 
Python Tutorial | Python Programming Language
Python Tutorial | Python Programming LanguagePython Tutorial | Python Programming Language
Python Tutorial | Python Programming Language
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
 
Python tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyPython tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academy
 
Introduction python
Introduction pythonIntroduction python
Introduction python
 
intro.pptx (1).pdf
intro.pptx (1).pdfintro.pptx (1).pdf
intro.pptx (1).pdf
 
Getting Started with Python
Getting Started with PythonGetting Started with Python
Getting Started with Python
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdfTraining report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
 
Seminar report on python 3 course
Seminar report on python 3 courseSeminar report on python 3 course
Seminar report on python 3 course
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python Programming-Lesson 1- Installation and Environmental Set-up.pptx
Python Programming-Lesson 1- Installation and Environmental Set-up.pptxPython Programming-Lesson 1- Installation and Environmental Set-up.pptx
Python Programming-Lesson 1- Installation and Environmental Set-up.pptx
 
REPORT ON AUDIT COURSE PYTHON BY SANA 2.pdf
REPORT ON AUDIT COURSE PYTHON BY SANA 2.pdfREPORT ON AUDIT COURSE PYTHON BY SANA 2.pdf
REPORT ON AUDIT COURSE PYTHON BY SANA 2.pdf
 
Python
PythonPython
Python
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python TutorialPython | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python Tutorial
 
python into.pptx
python into.pptxpython into.pptx
python into.pptx
 
Pyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdfPyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdf
 

Plus de ASIT

Asit Never Cheats Unemployes
Asit Never Cheats UnemployesAsit Never Cheats Unemployes
Asit Never Cheats Unemployes
ASIT
 
Asit amc never cheats students
Asit amc never cheats studentsAsit amc never cheats students
Asit amc never cheats students
ASIT
 

Plus de ASIT (20)

Asit education student review
Asit education student reviewAsit education student review
Asit education student review
 
ASIT EDUCATION STUDENT REVIEWS
ASIT EDUCATION STUDENT REVIEWSASIT EDUCATION STUDENT REVIEWS
ASIT EDUCATION STUDENT REVIEWS
 
Asit Education
Asit EducationAsit Education
Asit Education
 
Asit Education Student Reviews
Asit Education Student ReviewsAsit Education Student Reviews
Asit Education Student Reviews
 
Asit education Student review
Asit education Student reviewAsit education Student review
Asit education Student review
 
ASIT EDUCATION REVIEW
ASIT EDUCATION REVIEWASIT EDUCATION REVIEW
ASIT EDUCATION REVIEW
 
Asit Never Cheats Unemployes
Asit Never Cheats UnemployesAsit Never Cheats Unemployes
Asit Never Cheats Unemployes
 
Latest News on Amc Square Asit
Latest News on Amc Square AsitLatest News on Amc Square Asit
Latest News on Amc Square Asit
 
Asit amc never cheats students
Asit amc never cheats studentsAsit amc never cheats students
Asit amc never cheats students
 
News on AMC Square ASIT
News on AMC Square ASITNews on AMC Square ASIT
News on AMC Square ASIT
 
News on Asit Amc
News on Asit AmcNews on Asit Amc
News on Asit Amc
 
Time Management
Time ManagementTime Management
Time Management
 
learn Ruby at ASIT
learn Ruby at ASITlearn Ruby at ASIT
learn Ruby at ASIT
 
introduction to Mongodb
introduction to Mongodbintroduction to Mongodb
introduction to Mongodb
 
introduction to hadoop
introduction to hadoopintroduction to hadoop
introduction to hadoop
 
ASIT REVIEWS
ASIT REVIEWSASIT REVIEWS
ASIT REVIEWS
 
ASIT REVIEWS
ASIT REVIEWSASIT REVIEWS
ASIT REVIEWS
 
Learn REST API at ASIT
Learn REST API at ASITLearn REST API at ASIT
Learn REST API at ASIT
 
Learn C LANGUAGE at ASIT
Learn C LANGUAGE at ASITLearn C LANGUAGE at ASIT
Learn C LANGUAGE at ASIT
 
Learn Advanced JAVA at ASIT
Learn Advanced JAVA at ASITLearn Advanced JAVA at ASIT
Learn Advanced JAVA at ASIT
 

Dernier

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
QucHHunhnh
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Dernier (20)

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
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
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 

Learn PYTHON at ASIT

  • 1. PYTHON “PYTHON IS AN EXPERIMENT IN HOW MUCH FREEDOM PROGRAMMERS NEED. TOO MUCH FREEDOM AND NOBODY CAN READ ANOTHER'S CODE; TOO LITTLE AND EXPRESSIVE-NESS IS ENDANGERED.” - GUIDO VAN ROSSUM
  • 2.  Invented in the Netherlands, early 90s by Guido van Rossum  Named after Monty Python  Open sourced from the beginning  Considered a scripting language, but is much more  Scalable, object oriented and functional from the beginning  Used by Google from the beginning  Increasingly popular Brief History of Python
  • 3. http://docs.python.org/ Python is pre-installed on most Unix systems, including Linux and MAC OS X The pre-installed version may not be the most recent one (2.6.2 and 3.1.1 as of Sept 09) Download from http://python.org/download/ Python comes with a large library of standard modules
  • 4. Editing Python in Emacs Emacs python-mode has good support for editing Python, enabled enabled by default for .py files Features: completion, symbol help, eldoc, and inferior interpreter shell, etc.
  • 5. Running Programs on UNIX  Call python program via the python interpreter % python fact.py  Make a python file directly executable by Adding the  appropriate path to your python interpreter as the first line of your file #!/usr/bin/python  Making the file executable % chmod a+x fact.py  Invoking file from Unix command line % fact.py
  • 6. Example script : #! /usr/bin/python def fact(x): """Returns the factorial of its argument, assumed to be a posint""" if x == 0: return 1 return x * fact(x - 1) print print ’N fact(N)’ print "---------" for n in range(10): print n, fact(n)
  • 7. Python Scripts :  When you call a python program from the command line the interpreter evaluates each expression in the file  Familiar mechanisms are used to provide command line arguments and/or redirect input and output  Python also has mechanisms to allow a python program to act both as a script and as a module to be imported and used by another python program
  • 8. Results: python> python email0.py <email.txt bill@msft.com gates@microsoft.com steve@apple.com bill@msft.com python>
  • 9. we provide online and classroom training for PYTHON For more details www.asit.amcsquare.com Wise Machines India Pvt Ltd # 360, Sri Sai Padma Arcade, Varthur Main Road, Ramagondanahalli, Whitefield ,Bangalore – 560066 9740377262 * we also have branches in Hyderabad and Chennai