SlideShare uma empresa Scribd logo
1 de 10
Introduction to Python –
Learn Python Programming
What is Python?
• Python is a General Purpose object-oriented programming
language, which means that it can model real-world entities. It
is also dynamically-typed because it carries out type-checking at
runtime.
• It does so to make sure that the type of construct matches what
we expect it to be.
• The distinctive feature of Python is that it is an interpreted
language.
• The Python IDLE (Integrated Development Environment)
executes instructions one line at a time. This also lets us use it as
a calculator.
Why is it called Python?
• Guido van Rossum named it after the comedy group Monty
Python. That is why the metasyntactic variables (those we will
often use to explain code syntax) used here are ‘spam’ and ‘eggs’
instead of ‘foo’ and ‘bar’.
History of Python
• Python was conceived in the late 1980s and was named after
the BBC TV show Monty Python’s Flying Circus.
• Guido van Rossum started implementing Python at CWI in the
Netherlands in December of 1989.
• This was a successor to the ABC programming language which
was capable of exception handling and interfacing with the
Amoeba operating system.
• On October 16 of 2000, Python 2.0 released with many new
features.
• Then Python 3.0 was released on December 3, 2008.
Why Learn Python?
Python is the “most powerful language you can still
read”, Says Paul Dubois
Python is one of the richest Programming languages.
Going by the TIOBE Index, Python is the Most Popular Programming Language in
the world.
This makes a career in Python a great choice.
Applications of Python
• Python is easy to pick-up even if you come from a non-programming background. You can look at
the code and tell what’s going on.
• Talking of Python applications, some of the cool things that you can do are –
• Build a website using Python
• Develop a game in Python
• Perform Computer Vision (Facilities like face-detection and color-detection)
• Implement Machine Learning (Give a computer the ability to learn)
• Enable Robotics with Python
• Perform Web Scraping (Harvest data from websites)
• Perform Data Analysis using Python
• Automate a web browser
• Perform Scripting in Python
• Perform Scientific Computing using Python
• Build Artificial Intelligence
Python isn’t limited to these applications. If you’ve
ever used services from brands like YouTube,
Dropbox, and Netflix, then you’ve been a consumer
of Python.
The search-engine Google also made great use of
this language in its initial stages.
Python Architecture and Working
• Let’s now talk about Python architecture and its usual flow –
• a. Parser
• It uses the source code to generate an abstract syntax tree.
• b. Compiler
• It turns the abstract syntax tree into Python bytecode.
• c. Interpreter
• It executes the code line by line in a REPL (Read-Evaluate-
Print-Loop) fashion.
Python Constructs
a. Functions in Python
• A function in Python is a collection of statements grouped under a
name. You can use it whenever you want to execute all those statements
at a time.
• You can call it wherever you want and as many times as you want in a
program. A function may return a value.
b. Classes in Python
• As we discussed earlier, Python is an object-oriented language. It
supports classes and objects.
• A class is an abstract data type. In other words, it is a blueprint for an
object of a certain kind. It holds no values.
• An object is a real-world entity and an instance of a class.
c. Modules in Python
• Python module is a collection of related classes and functions.
• We have modules for mathematical calculations, string manipulations,
web programming, and many more.
d. Packages in Python
• Python package is a collection of related modules. You can either
import a package or create your own.
• Python has a lot of other constructs. These include control structures,
functions, exceptions, etc.
2. Python syntax
• Example of Python Syntax
• Python is a popular language because of its elegant syntax
structure.
• Let’s take a quick look at a simple Python program and you will
get an idea of how programming in Python looks like.

Mais conteúdo relacionado

Semelhante a Introduction to Python – Learn Python Programming.pptx

Introduction to Python Programming Basics
Introduction  to  Python  Programming BasicsIntroduction  to  Python  Programming Basics
Introduction to Python Programming BasicsDhana malar
 
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
Introduction to pythonIntroduction to python
Introduction to pythonMohammed Rafi
 
Python presentation of Government Engineering College Aurangabad, Bihar
Python presentation of Government Engineering College Aurangabad, BiharPython presentation of Government Engineering College Aurangabad, Bihar
Python presentation of Government Engineering College Aurangabad, BiharUttamKumar617567
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonNikhil Kapoor
 
Python.pptx
Python.pptxPython.pptx
Python.pptxabclara
 
Python_Introduction&DataType.pptx
Python_Introduction&DataType.pptxPython_Introduction&DataType.pptx
Python_Introduction&DataType.pptxHaythamBarakeh1
 
Learn Python Python Introduction for Beginners.pdf
Learn Python  Python Introduction for Beginners.pdfLearn Python  Python Introduction for Beginners.pdf
Learn Python Python Introduction for Beginners.pdfSudhanshiBakre1
 
Python Programming1.ppt
Python Programming1.pptPython Programming1.ppt
Python Programming1.pptRehnawilson1
 
introduction to Python (for beginners)
introduction to Python (for beginners)introduction to Python (for beginners)
introduction to Python (for beginners)guobichrng
 
Python programming
Python programmingPython programming
Python programmingMegha V
 
Introduction to Python Programing
Introduction to Python ProgramingIntroduction to Python Programing
Introduction to Python Programingsameer patil
 

Semelhante a Introduction to Python – Learn Python Programming.pptx (20)

Python intro
Python introPython intro
Python intro
 
Introduction to Python Programming Basics
Introduction  to  Python  Programming BasicsIntroduction  to  Python  Programming Basics
Introduction to Python Programming Basics
 
Python Programming.pptx
Python Programming.pptxPython Programming.pptx
Python Programming.pptx
 
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
Introduction to pythonIntroduction to python
Introduction to python
 
Python presentation of Government Engineering College Aurangabad, Bihar
Python presentation of Government Engineering College Aurangabad, BiharPython presentation of Government Engineering College Aurangabad, Bihar
Python presentation of Government Engineering College Aurangabad, Bihar
 
Python basics
Python basicsPython basics
Python basics
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python Programming Part 1.pdf
Python Programming Part 1.pdfPython Programming Part 1.pdf
Python Programming Part 1.pdf
 
Python Programming Part 1.pdf
Python Programming Part 1.pdfPython Programming Part 1.pdf
Python Programming Part 1.pdf
 
Python Programming Part 1.pdf
Python Programming Part 1.pdfPython Programming Part 1.pdf
Python Programming Part 1.pdf
 
Python.pptx
Python.pptxPython.pptx
Python.pptx
 
Python_Introduction&DataType.pptx
Python_Introduction&DataType.pptxPython_Introduction&DataType.pptx
Python_Introduction&DataType.pptx
 
Learn Python Python Introduction for Beginners.pdf
Learn Python  Python Introduction for Beginners.pdfLearn Python  Python Introduction for Beginners.pdf
Learn Python Python Introduction for Beginners.pdf
 
Python Class 1
Python Class 1Python Class 1
Python Class 1
 
Python Programming1.ppt
Python Programming1.pptPython Programming1.ppt
Python Programming1.ppt
 
Python Programming Draft PPT.pptx
Python Programming Draft PPT.pptxPython Programming Draft PPT.pptx
Python Programming Draft PPT.pptx
 
introduction to Python (for beginners)
introduction to Python (for beginners)introduction to Python (for beginners)
introduction to Python (for beginners)
 
Python programming
Python programmingPython programming
Python programming
 
Introduction to Python Programing
Introduction to Python ProgramingIntroduction to Python Programing
Introduction to Python Programing
 

Mais de HassanShah396906

lit-review-presentation [Autosaved].pptx
lit-review-presentation [Autosaved].pptxlit-review-presentation [Autosaved].pptx
lit-review-presentation [Autosaved].pptxHassanShah396906
 
Optoelectronics Device’s.pptx
Optoelectronics Device’s.pptxOptoelectronics Device’s.pptx
Optoelectronics Device’s.pptxHassanShah396906
 
5.Introduction_to_Heisenberg_model.pptx
5.Introduction_to_Heisenberg_model.pptx5.Introduction_to_Heisenberg_model.pptx
5.Introduction_to_Heisenberg_model.pptxHassanShah396906
 
M1 - Research Philosophy and Methods.pptx
M1 - Research Philosophy and Methods.pptxM1 - Research Philosophy and Methods.pptx
M1 - Research Philosophy and Methods.pptxHassanShah396906
 
Finite Element Method.pptx
Finite Element Method.pptxFinite Element Method.pptx
Finite Element Method.pptxHassanShah396906
 
Ch # 9 Electrode Polarization.pptx
Ch # 9 Electrode Polarization.pptxCh # 9 Electrode Polarization.pptx
Ch # 9 Electrode Polarization.pptxHassanShah396906
 
Density Functional Theory.pptx
Density Functional Theory.pptxDensity Functional Theory.pptx
Density Functional Theory.pptxHassanShah396906
 
Molecular dynamics Simulation.pptx
Molecular dynamics Simulation.pptxMolecular dynamics Simulation.pptx
Molecular dynamics Simulation.pptxHassanShah396906
 

Mais de HassanShah396906 (13)

lit-review-presentation [Autosaved].pptx
lit-review-presentation [Autosaved].pptxlit-review-presentation [Autosaved].pptx
lit-review-presentation [Autosaved].pptx
 
Bone Cement.pptx
Bone Cement.pptxBone Cement.pptx
Bone Cement.pptx
 
Optoelectronics Device’s.pptx
Optoelectronics Device’s.pptxOptoelectronics Device’s.pptx
Optoelectronics Device’s.pptx
 
5.Introduction_to_Heisenberg_model.pptx
5.Introduction_to_Heisenberg_model.pptx5.Introduction_to_Heisenberg_model.pptx
5.Introduction_to_Heisenberg_model.pptx
 
M1 - Research Philosophy and Methods.pptx
M1 - Research Philosophy and Methods.pptxM1 - Research Philosophy and Methods.pptx
M1 - Research Philosophy and Methods.pptx
 
Finite Element Method.pptx
Finite Element Method.pptxFinite Element Method.pptx
Finite Element Method.pptx
 
Ch # 9 Electrode Polarization.pptx
Ch # 9 Electrode Polarization.pptxCh # 9 Electrode Polarization.pptx
Ch # 9 Electrode Polarization.pptx
 
2. Chap 1.pptx
2. Chap 1.pptx2. Chap 1.pptx
2. Chap 1.pptx
 
Density Functional Theory.pptx
Density Functional Theory.pptxDensity Functional Theory.pptx
Density Functional Theory.pptx
 
5. Summing Series.pptx
5. Summing Series.pptx5. Summing Series.pptx
5. Summing Series.pptx
 
Molecular dynamics Simulation.pptx
Molecular dynamics Simulation.pptxMolecular dynamics Simulation.pptx
Molecular dynamics Simulation.pptx
 
Interconnects.pptx
Interconnects.pptxInterconnects.pptx
Interconnects.pptx
 
VMDL_FEATURES.ppt
VMDL_FEATURES.pptVMDL_FEATURES.ppt
VMDL_FEATURES.ppt
 

Último

Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bSérgio Sacani
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxgindu3009
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .Poonam Aher Patil
 
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...Monika Rani
 
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRLKochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRLkantirani197
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPirithiRaju
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksSérgio Sacani
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and ClassificationsAreesha Ahmad
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​kaibalyasahoo82800
 
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptxCOST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptxFarihaAbdulRasheed
 
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...chandars293
 
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Servicenishacall1
 
Zoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdfZoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdfSumit Kumar yadav
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPirithiRaju
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryAlex Henderson
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Silpa
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPirithiRaju
 
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencySheetal Arora
 

Último (20)

Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
 
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRLKochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
Kochi ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Kochi ESCORT SERVICE❤CALL GIRL
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and Classifications
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptxCOST ESTIMATION FOR A RESEARCH PROJECT.pptx
COST ESTIMATION FOR A RESEARCH PROJECT.pptx
 
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
 
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
 
Zoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdfZoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdf
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
Site Acceptance Test .
Site Acceptance Test                    .Site Acceptance Test                    .
Site Acceptance Test .
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
 
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Alandi Call Me 7737669865 Budget Friendly No Advance Booking
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
 

Introduction to Python – Learn Python Programming.pptx

  • 1. Introduction to Python – Learn Python Programming
  • 2. What is Python? • Python is a General Purpose object-oriented programming language, which means that it can model real-world entities. It is also dynamically-typed because it carries out type-checking at runtime. • It does so to make sure that the type of construct matches what we expect it to be. • The distinctive feature of Python is that it is an interpreted language. • The Python IDLE (Integrated Development Environment) executes instructions one line at a time. This also lets us use it as a calculator.
  • 3. Why is it called Python? • Guido van Rossum named it after the comedy group Monty Python. That is why the metasyntactic variables (those we will often use to explain code syntax) used here are ‘spam’ and ‘eggs’ instead of ‘foo’ and ‘bar’.
  • 4. History of Python • Python was conceived in the late 1980s and was named after the BBC TV show Monty Python’s Flying Circus. • Guido van Rossum started implementing Python at CWI in the Netherlands in December of 1989. • This was a successor to the ABC programming language which was capable of exception handling and interfacing with the Amoeba operating system. • On October 16 of 2000, Python 2.0 released with many new features. • Then Python 3.0 was released on December 3, 2008.
  • 5. Why Learn Python? Python is the “most powerful language you can still read”, Says Paul Dubois Python is one of the richest Programming languages. Going by the TIOBE Index, Python is the Most Popular Programming Language in the world. This makes a career in Python a great choice.
  • 6. Applications of Python • Python is easy to pick-up even if you come from a non-programming background. You can look at the code and tell what’s going on. • Talking of Python applications, some of the cool things that you can do are – • Build a website using Python • Develop a game in Python • Perform Computer Vision (Facilities like face-detection and color-detection) • Implement Machine Learning (Give a computer the ability to learn) • Enable Robotics with Python • Perform Web Scraping (Harvest data from websites) • Perform Data Analysis using Python • Automate a web browser • Perform Scripting in Python • Perform Scientific Computing using Python • Build Artificial Intelligence Python isn’t limited to these applications. If you’ve ever used services from brands like YouTube, Dropbox, and Netflix, then you’ve been a consumer of Python. The search-engine Google also made great use of this language in its initial stages.
  • 7. Python Architecture and Working • Let’s now talk about Python architecture and its usual flow – • a. Parser • It uses the source code to generate an abstract syntax tree. • b. Compiler • It turns the abstract syntax tree into Python bytecode. • c. Interpreter • It executes the code line by line in a REPL (Read-Evaluate- Print-Loop) fashion.
  • 8. Python Constructs a. Functions in Python • A function in Python is a collection of statements grouped under a name. You can use it whenever you want to execute all those statements at a time. • You can call it wherever you want and as many times as you want in a program. A function may return a value. b. Classes in Python • As we discussed earlier, Python is an object-oriented language. It supports classes and objects. • A class is an abstract data type. In other words, it is a blueprint for an object of a certain kind. It holds no values. • An object is a real-world entity and an instance of a class.
  • 9. c. Modules in Python • Python module is a collection of related classes and functions. • We have modules for mathematical calculations, string manipulations, web programming, and many more. d. Packages in Python • Python package is a collection of related modules. You can either import a package or create your own. • Python has a lot of other constructs. These include control structures, functions, exceptions, etc.
  • 10. 2. Python syntax • Example of Python Syntax • Python is a popular language because of its elegant syntax structure. • Let’s take a quick look at a simple Python program and you will get an idea of how programming in Python looks like.