SlideShare una empresa de 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.

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado

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

Similar 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
 

Similar 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

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Último (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

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.