SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Introduction to Python


“To describe something as clever is NOT considered
a compliment in the Python culture.” Alex Martelli, Python
Cookbook (2nd ed., p. 230)




                        Prepared by:
       Amgad Mohamed | Hussein Mohamed | Yasser Mohsen
Brief Introduction
– Python is a general-purpose, high-level programming
  language whose design philosophy emphasizes code
  readability.
– Python claims to "combine remarkable power with
  very clear syntax", along with a huge standard
  library with the uniqueness of using indentation as a
  block delimiters.
– Python had three major releases to support multiple
  programming paradigms including Object Oriented
  Programming, Imperative programming and
  Functional programming. Additionally, it features a
  fully dynamic typing systems and automatic garbage
  collection.
Quick History
– Python was conceived in the late 1980s, and its
  implementation was started in December 1989 by Guido
  van Rossum.

– Python 2.0 was released on 16 October 2000, with many
  major new features including a full garbage collector and
  support for Unicode.

– Python 3.0 (also known as Python 3000 or py3k), a major,
  backwards-incompatible release, was released on 3
  December 2008.
   • Python 3.0 was developed with the same philosophy as in prior
     versions. However, as Python had accumulated new and redundant
     ways to program the same task, Python 3.0 had an emphasis on
     removing duplicative constructs and modules, in keeping with "There
     should be one and preferably only one obvious way to do it".
Advantages / Disadvantages
 I.      Supports multiple paradigms.
 II.     Less code To Achieve More (Expressiveness)
 III.    Support Libraries (Extendibility)
 IV.     High productivity
        A.    Less time to code and since there is no compilation step; the edit-
             test-debug cycle is incredibly fast.
        B.   Anecdotal evidence suggests that one Python programmer can finish
             in two months what two C++ programmers can't complete in a year,
             Python code is often 5-10 times shorter than equivalent C++ code.
        C.   Python programs are typically 3-5 times shorter than equivalent Java
             programs.
 V.      Auto Memory Management and Exception Handling.

I. Compared to other programming languages, Python performance (time
and space), is way behind, Hard to Translate, and lack of documentation.
Benchmarking
Translation
– Python Code is compiled to byte code similar
  to Java, and then this Byte code is interpreted
  to the underlying machine language. (Pseudo
  Interpreter)

– This byte code provides
  • portability.
  • speed execution - byte code can be run much
    more quickly than the original source code
Sample Code - GCD
def gcd(a, b):
  "greatest common divisor"
  while a != 0:
     a, b = b%a, a  # parallel assignment
  return b
Zen of Python (Easter Egg)
•   Beautiful is better than ugly.
•   Explicit is better than implicit.
•   Simple is better than complex.
•   Complex is better than complicated.
•   Flat is better than nested.
•   Sparse is better than dense.
•   Readability counts.
•   Special cases aren't special enough to break the rules.
•   Although practicality beats purity.
•   Errors should never pass silently
•   Unless explicitly silenced.
•   In the face of ambiguity, refuse the temptation to guess.
•   There should be one-- and preferably only one --obvious way to do it.
•   Although that way may not be obvious at first unless you're Dutch.
•   Now is better than never.
•   Although never is often better than *right* now.
•   If the implementation is hard to explain, it's a bad idea.
•   If the implementation is easy to explain, it may be a good idea.
•   Namespaces are one honking great idea -- let's do more of those!
References
• [1] http://docs.python.org/faq/general.html#what-is-python-good-for.
  Retrieved 2011-10-04
• [2] http://www.python.org/doc/essays/blurb/ Python
  documentation. Retrieved 2011-10-04.
• [3] http://docs.python.org/faq/general#what-is-python Retrieved
  2011-10-04
• [4] http://www.artima.com/intv/pythonP.html Retrieved 2011-10-04
• [5] http://docs.python.org/license.html Retrieved 2011-10-04
• [6] http://python.org/download/releases/3.0/ Retrieved 2011-10-04
• [7]http://ugweb.cs.ualberta.ca/~c410/F07/410/presentations/ReportP
  ython.pdf
• [8] Learning Python 4th Ed, Mark Lutz
• [9] Core Python Programming 2nd Edition, Wesley J. Chun - Sep
  2006
• [10] Python Enhancement Proposals, 20 -- The Zen of Python.

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction Jupyter Notebook
Introduction Jupyter NotebookIntroduction Jupyter Notebook
Introduction Jupyter Notebookthirumurugan133
 
Python for the C# developer
Python for the C# developerPython for the C# developer
Python for the C# developerMichael Kennedy
 
Python, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for EngineersPython, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for EngineersBoey Pak Cheong
 
Python course syllabus
Python course syllabusPython course syllabus
Python course syllabusSugantha T
 
Raspberry using Python Session 3
Raspberry using Python Session 3Raspberry using Python Session 3
Raspberry using Python Session 3Mohamed Abd Ela'al
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To PythonVanessa Rene
 
Python Type Hints
Python Type HintsPython Type Hints
Python Type HintsIgor Leroy
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming KrishnaMildain
 
Introduction to python lecture (1)
Introduction to python lecture (1)Introduction to python lecture (1)
Introduction to python lecture (1)Ali ٍSattar
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1Kanchilug
 
Why Python?
Why Python?Why Python?
Why Python?Adam Pah
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonManishJha237
 
Python 101 For The Net Developer
Python 101 For The Net DeveloperPython 101 For The Net Developer
Python 101 For The Net DeveloperSarah Dutkiewicz
 
Introduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonIntroduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonPro Guide
 

Was ist angesagt? (20)

Introduction Jupyter Notebook
Introduction Jupyter NotebookIntroduction Jupyter Notebook
Introduction Jupyter Notebook
 
Python for the C# developer
Python for the C# developerPython for the C# developer
Python for the C# developer
 
Python, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for EngineersPython, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for Engineers
 
Python course syllabus
Python course syllabusPython course syllabus
Python course syllabus
 
Raspberry using Python Session 3
Raspberry using Python Session 3Raspberry using Python Session 3
Raspberry using Python Session 3
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To Python
 
Python Type Hints
Python Type HintsPython Type Hints
Python Type Hints
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
 
Introduction to python lecture (1)
Introduction to python lecture (1)Introduction to python lecture (1)
Introduction to python lecture (1)
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
 
Introduction to python
 Introduction to python Introduction to python
Introduction to python
 
Why Python?
Why Python?Why Python?
Why Python?
 
Four Python Pains
Four Python PainsFour Python Pains
Four Python Pains
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Why learn python in 2017?
Why learn python in 2017?Why learn python in 2017?
Why learn python in 2017?
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python 101 For The Net Developer
Python 101 For The Net DeveloperPython 101 For The Net Developer
Python 101 For The Net Developer
 
Python
PythonPython
Python
 
Introduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonIntroduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of Python
 
Presentation on python
Presentation on pythonPresentation on python
Presentation on python
 

Andere mochten auch

Andere mochten auch (14)

The man
The manThe man
The man
 
Q3 pitch
Q3 pitchQ3 pitch
Q3 pitch
 
Corba
CorbaCorba
Corba
 
Tough Mudder "post event blog"
Tough Mudder "post event blog"Tough Mudder "post event blog"
Tough Mudder "post event blog"
 
Posters
PostersPosters
Posters
 
Design Cycle
Design CycleDesign Cycle
Design Cycle
 
CUDA and Caffe for deep learning
CUDA and Caffe for deep learningCUDA and Caffe for deep learning
CUDA and Caffe for deep learning
 
The man
The manThe man
The man
 
Android Performance Best Practices
Android Performance Best Practices Android Performance Best Practices
Android Performance Best Practices
 
RecSports Rebrand
RecSports RebrandRecSports Rebrand
RecSports Rebrand
 
Auto-Encoders and PCA, a brief psychological background
Auto-Encoders and PCA, a brief psychological backgroundAuto-Encoders and PCA, a brief psychological background
Auto-Encoders and PCA, a brief psychological background
 
Unsupervised Feature Learning
Unsupervised Feature LearningUnsupervised Feature Learning
Unsupervised Feature Learning
 
Google File System
Google File SystemGoogle File System
Google File System
 
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job? Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
 

Ähnlich wie Python

Python Programming1.ppt
Python Programming1.pptPython Programming1.ppt
Python Programming1.pptRehnawilson1
 
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinalProf. Wim Van Criekinge
 
Introduction to Python – Learn Python Programming.pptx
Introduction to Python – Learn Python Programming.pptxIntroduction to Python – Learn Python Programming.pptx
Introduction to Python – Learn Python Programming.pptxHassanShah396906
 
Welcome to the Brixton Library Technology Initiative
Welcome to the Brixton Library Technology InitiativeWelcome to the Brixton Library Technology Initiative
Welcome to the Brixton Library Technology InitiativeBasil Bibi
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptxArpittripathi45
 
Introduction-to-Python.pptx
Introduction-to-Python.pptxIntroduction-to-Python.pptx
Introduction-to-Python.pptxAyushDey1
 
Python programming
Python programmingPython programming
Python programmingMegha V
 
Programming with Python: Week 1
Programming with Python: Week 1Programming with Python: Week 1
Programming with Python: Week 1Ahmet Bulut
 
Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Carlos Miguel Ferreira
 
Python.pptx
Python.pptxPython.pptx
Python.pptxabclara
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unitmichaelaaron25322
 
Python-Yesterday Today Tomorrow(What's new?)
Python-Yesterday Today Tomorrow(What's new?)Python-Yesterday Today Tomorrow(What's new?)
Python-Yesterday Today Tomorrow(What's new?)Mohan Arumugam
 
Introduction to Python Programming Basics
Introduction  to  Python  Programming BasicsIntroduction  to  Python  Programming Basics
Introduction to Python Programming BasicsDhana malar
 
Python Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & stylePython Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & styleKevlin Henney
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioMuralidharan Deenathayalan
 

Ähnlich wie Python (20)

Python Programming1.ppt
Python Programming1.pptPython Programming1.ppt
Python Programming1.ppt
 
What is python
What is pythonWhat is python
What is python
 
Doing the Impossible
Doing the ImpossibleDoing the Impossible
Doing the Impossible
 
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
 
Introduction to Python – Learn Python Programming.pptx
Introduction to Python – Learn Python Programming.pptxIntroduction to Python – Learn Python Programming.pptx
Introduction to Python – Learn Python Programming.pptx
 
Welcome to the Brixton Library Technology Initiative
Welcome to the Brixton Library Technology InitiativeWelcome to the Brixton Library Technology Initiative
Welcome to the Brixton Library Technology Initiative
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptx
 
Introduction-to-Python.pptx
Introduction-to-Python.pptxIntroduction-to-Python.pptx
Introduction-to-Python.pptx
 
Python programming
Python programmingPython programming
Python programming
 
Programming with Python: Week 1
Programming with Python: Week 1Programming with Python: Week 1
Programming with Python: Week 1
 
Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.
 
Python.pptx
Python.pptxPython.pptx
Python.pptx
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unit
 
Python-Yesterday Today Tomorrow(What's new?)
Python-Yesterday Today Tomorrow(What's new?)Python-Yesterday Today Tomorrow(What's new?)
Python-Yesterday Today Tomorrow(What's new?)
 
Introduction to Python Programming Basics
Introduction  to  Python  Programming BasicsIntroduction  to  Python  Programming Basics
Introduction to Python Programming Basics
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Python Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & stylePython Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & style
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning StudioIntroduction to Jupyter notebook and MS Azure Machine Learning Studio
Introduction to Jupyter notebook and MS Azure Machine Learning Studio
 

Kürzlich hochgeladen

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 

Python

  • 1. Introduction to Python “To describe something as clever is NOT considered a compliment in the Python culture.” Alex Martelli, Python Cookbook (2nd ed., p. 230) Prepared by: Amgad Mohamed | Hussein Mohamed | Yasser Mohsen
  • 2.
  • 3. Brief Introduction – Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. – Python claims to "combine remarkable power with very clear syntax", along with a huge standard library with the uniqueness of using indentation as a block delimiters. – Python had three major releases to support multiple programming paradigms including Object Oriented Programming, Imperative programming and Functional programming. Additionally, it features a fully dynamic typing systems and automatic garbage collection.
  • 4. Quick History – Python was conceived in the late 1980s, and its implementation was started in December 1989 by Guido van Rossum. – Python 2.0 was released on 16 October 2000, with many major new features including a full garbage collector and support for Unicode. – Python 3.0 (also known as Python 3000 or py3k), a major, backwards-incompatible release, was released on 3 December 2008. • Python 3.0 was developed with the same philosophy as in prior versions. However, as Python had accumulated new and redundant ways to program the same task, Python 3.0 had an emphasis on removing duplicative constructs and modules, in keeping with "There should be one and preferably only one obvious way to do it".
  • 5. Advantages / Disadvantages I. Supports multiple paradigms. II. Less code To Achieve More (Expressiveness) III. Support Libraries (Extendibility) IV. High productivity A. Less time to code and since there is no compilation step; the edit- test-debug cycle is incredibly fast. B. Anecdotal evidence suggests that one Python programmer can finish in two months what two C++ programmers can't complete in a year, Python code is often 5-10 times shorter than equivalent C++ code. C. Python programs are typically 3-5 times shorter than equivalent Java programs. V. Auto Memory Management and Exception Handling. I. Compared to other programming languages, Python performance (time and space), is way behind, Hard to Translate, and lack of documentation.
  • 7. Translation – Python Code is compiled to byte code similar to Java, and then this Byte code is interpreted to the underlying machine language. (Pseudo Interpreter) – This byte code provides • portability. • speed execution - byte code can be run much more quickly than the original source code
  • 8. Sample Code - GCD def gcd(a, b): "greatest common divisor" while a != 0: a, b = b%a, a # parallel assignment return b
  • 9. Zen of Python (Easter Egg) • Beautiful is better than ugly. • Explicit is better than implicit. • Simple is better than complex. • Complex is better than complicated. • Flat is better than nested. • Sparse is better than dense. • Readability counts. • Special cases aren't special enough to break the rules. • Although practicality beats purity. • Errors should never pass silently • Unless explicitly silenced. • In the face of ambiguity, refuse the temptation to guess. • There should be one-- and preferably only one --obvious way to do it. • Although that way may not be obvious at first unless you're Dutch. • Now is better than never. • Although never is often better than *right* now. • If the implementation is hard to explain, it's a bad idea. • If the implementation is easy to explain, it may be a good idea. • Namespaces are one honking great idea -- let's do more of those!
  • 10. References • [1] http://docs.python.org/faq/general.html#what-is-python-good-for. Retrieved 2011-10-04 • [2] http://www.python.org/doc/essays/blurb/ Python documentation. Retrieved 2011-10-04. • [3] http://docs.python.org/faq/general#what-is-python Retrieved 2011-10-04 • [4] http://www.artima.com/intv/pythonP.html Retrieved 2011-10-04 • [5] http://docs.python.org/license.html Retrieved 2011-10-04 • [6] http://python.org/download/releases/3.0/ Retrieved 2011-10-04 • [7]http://ugweb.cs.ualberta.ca/~c410/F07/410/presentations/ReportP ython.pdf • [8] Learning Python 4th Ed, Mark Lutz • [9] Core Python Programming 2nd Edition, Wesley J. Chun - Sep 2006 • [10] Python Enhancement Proposals, 20 -- The Zen of Python.