SlideShare uma empresa Scribd logo
1 de 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.

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Destaque

Destaque (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?
 

Semelhante a 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
 

Semelhante a 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
 

Último

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Último (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

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.