SlideShare a Scribd company logo
PYTHON
PROGRAMING
SAMEER PATIL
INTRODUCTION
• C programing concern with functional aspect. We are concerning with writing code using
function.
• Programing will become easy if it based on real life example, hence they develop Object
Oriented Language like Java and .NET where programing done with Classes and Objects.
• Java Program to Write sum of two numbers
• C program to write sum of two numbers
• Python style
• a=b=10
• print(“sum”,(a+b))
HISTORY
• Python was developed by Guido Van Rossum in year 1991, at center for mathematics and
Computer science managed by Dutch Govt.
• Developer was working on project to develop system utilities in C where he had interact with
bourn shell available in UNIX.
• Python name appeared from the TV Show Monty Python’s Flying Circus
• Official launched on 20th Feb 1991.
• Python is Open Source.
FEATURES OF PYTHON
• Simple
• Easy to learn
• Open Source
• High level Language
• Dynamically Typed
• Platform Independence
• Portable
• procedure and Object oriented
• Simple-Python is simple programing Language .felt like reading English sentences. It means more
clarity and less stress on understating of syntax of language
• Easy to learn – uses very few keyword , program structure is simple. Similar to C programing .
Hence Migration from C to Python is easy for programmers.
• Open Source - easily available for download www.python.org
• High level Language – Similar to English Language , low level language Machine understandable
code.
• Dynamically Typed-in Python , we are not declaring anything.an assignment statement binds a
name to an objects can be of any type. If a name is assigned to an objects of one type, it may be later
be assigned to an objects of different type.
• >>>year = 2017
• >>> dec = 1.1
• >>> hello = 'Hello, World!'
• >>> alphabet = ['a','b','c']
• But what ‘types’ are these variables? Let’s use the types module to find out:
• >>> from types import *
• >>> type(year)
• <type 'int'>
• >>> type(dec)
• <type 'float'>
• >>> type(hello)
• <type 'str'>
• >>> type(alphabet)
• <type 'list'>
• As you can see, I didn’t have to tell Python what ‘type’ each variable value was, it assigned the
types dynamically
• Platform Independent-
• Portable
• Procedure and OOPS based.
• Class is collection of objects having similar attributes and operation.
• Python Packages –
• BOTO is amazon web services
• CherryPy is Object oriented HTTP framework
• Fiona reads and write big data files.
• Mysql-connector –python is driver written in python to connect to MySQL database
• Numpy-is a package for processing array of single or multidimensional type
• Pandas is package for powerful data structure for data analysis, time series and statistics
• Pillow is python imaging library.
• Pyquery represent jquery like library for python.
• W3lib is library of web related function.
EXECUTION OF PYTHON PROGRAM
• Python program can write in abc.py where abc is name of the program wheras .py is extension
name.
• Compile the program into python compiler.
• Byte code.
• Abc.pyc
• Pvm
• machinecode
• result
C VS PYTHON
C programing Python Programing
C program execute Faster Slower compared to C
Type Declaration Compulsory Not required
C language type discipline in static and weak Python type discipline is dynamic and Strong
Pointers available No Pointers
C ha s switch statements No switch statement
Memory allocation using malloc and calloc Memory allocation and Deallocation done by PVM
Procedural approch Oops based
JAVA VS PYTHON
JAVA PYTHON
Memory allocation and deallocation done by JVM PVM
Switch is allowed No switch
A semicolon is used to terminate the statement and
comma is used to separate expression.
New line indicate end of statement and semicolon is
used as an expression separator
Array index is positive integer Can be positive or negative.
Static and weak Dynamic and strong
Oops languages, functional programing used in java
8.0 in lamda expression
Oops language, blends functional programming with
lambda expression inbuild.
PVM
• Python source file converted in Byte Code format.
• Byte code represent the fixed set of instruction created by python developers representing all
types of operations.
• And store that file in .pyc extension
• Role of PVM to convert that byte code into machine understandable code, so that computer can
execute that machine code and display result.
• To carry out this conversion , byte code into machine code and sends that machine code to
computer processor for execution. Since Interpreter plays main role, often pvm also mention as
interpreter.
FROZEN BINARIES
• Frozen binary executables are packages that combine your program's byte code and the Python
interpreter into a single executable program. With these, programs can be launched in the same
ways that you would launch any other executable program (icon clicks, command lines, etc.).
• py2exe
MEMORY MANAGEMENT IN PYTHON
• Python , memory allocation and deallocation are done during runtime automatically.
• The programmer need not allocate memory while creating objects or deallocate memory when
deleting the objects. Python PVM take care of such issues.
• Everything is consider as an objects in Python. Example Strings are objects, list are objects ,
functions are objects.
• For every object, memory should be allocated .memory manager inside PVM allocates memory
required for the objects created in Python Programming .
• All these objects are stored on separate memory called Heap.
• Heap is memory which allocated during runtime.
GARBAGE COLLECTION IN PYTHON
• Python’s memory allocation and deallocation method is automatic.
• Python uses two strategies for memory allocation:
• Reference counting
• Garbage collection
• the Python interpreter only used reference counting for memory management. Reference counting
works by counting the number of times an object is referenced by other objects in the system. When
references to an object are removed, the reference count for an object is decremented. When the
reference count becomes zero, the object is deallocated.
Ad

More Related Content

What's hot (20)

Data Visualization in Python
Data Visualization in PythonData Visualization in Python
Data Visualization in Python
Jagriti Goswami
 
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Edureka!
 
Data Analysis and Visualization using Python
Data Analysis and Visualization using PythonData Analysis and Visualization using Python
Data Analysis and Visualization using Python
Chariza Pladin
 
Introduction to Python for Data Science
Introduction to Python for Data ScienceIntroduction to Python for Data Science
Introduction to Python for Data Science
Arc & Codementor
 
Python
PythonPython
Python
Aashish Jain
 
Python Class | Python Programming | Python Tutorial | Edureka
Python Class | Python Programming | Python Tutorial | EdurekaPython Class | Python Programming | Python Tutorial | Edureka
Python Class | Python Programming | Python Tutorial | Edureka
Edureka!
 
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
Boey Pak Cheong
 
Data Visualization(s) Using Python
Data Visualization(s) Using PythonData Visualization(s) Using Python
Data Visualization(s) Using Python
Aniket Maithani
 
Python
PythonPython
Python
Mohammad Junaid Khan
 
Python Basics | Python Tutorial | Edureka
Python Basics | Python Tutorial | EdurekaPython Basics | Python Tutorial | Edureka
Python Basics | Python Tutorial | Edureka
Edureka!
 
Introduction to IPython & Jupyter Notebooks
Introduction to IPython & Jupyter NotebooksIntroduction to IPython & Jupyter Notebooks
Introduction to IPython & Jupyter Notebooks
Eueung Mulyana
 
Preparing, Piloting & Paths to Success with Microsoft Copilot
Preparing, Piloting & Paths to Success with Microsoft CopilotPreparing, Piloting & Paths to Success with Microsoft Copilot
Preparing, Piloting & Paths to Success with Microsoft Copilot
Richard Harbridge
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python
amiable_indian
 
Data Visualization Techniques in Power BI
Data Visualization Techniques in Power BIData Visualization Techniques in Power BI
Data Visualization Techniques in Power BI
Angel Abundez
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Ayshwarya Baburam
 
Introduction to data analysis using python
Introduction to data analysis using pythonIntroduction to data analysis using python
Introduction to data analysis using python
Guido Luz Percú
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
Nowell Strite
 
Introduction to Python Pandas for Data Analytics
Introduction to Python Pandas for Data AnalyticsIntroduction to Python Pandas for Data Analytics
Introduction to Python Pandas for Data Analytics
Phoenix
 
Python for Data Science | Python Data Science Tutorial | Data Science Certifi...
Python for Data Science | Python Data Science Tutorial | Data Science Certifi...Python for Data Science | Python Data Science Tutorial | Data Science Certifi...
Python for Data Science | Python Data Science Tutorial | Data Science Certifi...
Edureka!
 
Python ppt.pptx
Python ppt.pptxPython ppt.pptx
Python ppt.pptx
SujeetKumar272226
 
Data Visualization in Python
Data Visualization in PythonData Visualization in Python
Data Visualization in Python
Jagriti Goswami
 
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...Python Programming Language | Python Classes | Python Tutorial | Python Train...
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Edureka!
 
Data Analysis and Visualization using Python
Data Analysis and Visualization using PythonData Analysis and Visualization using Python
Data Analysis and Visualization using Python
Chariza Pladin
 
Introduction to Python for Data Science
Introduction to Python for Data ScienceIntroduction to Python for Data Science
Introduction to Python for Data Science
Arc & Codementor
 
Python Class | Python Programming | Python Tutorial | Edureka
Python Class | Python Programming | Python Tutorial | EdurekaPython Class | Python Programming | Python Tutorial | Edureka
Python Class | Python Programming | Python Tutorial | Edureka
Edureka!
 
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
Boey Pak Cheong
 
Data Visualization(s) Using Python
Data Visualization(s) Using PythonData Visualization(s) Using Python
Data Visualization(s) Using Python
Aniket Maithani
 
Python Basics | Python Tutorial | Edureka
Python Basics | Python Tutorial | EdurekaPython Basics | Python Tutorial | Edureka
Python Basics | Python Tutorial | Edureka
Edureka!
 
Introduction to IPython & Jupyter Notebooks
Introduction to IPython & Jupyter NotebooksIntroduction to IPython & Jupyter Notebooks
Introduction to IPython & Jupyter Notebooks
Eueung Mulyana
 
Preparing, Piloting & Paths to Success with Microsoft Copilot
Preparing, Piloting & Paths to Success with Microsoft CopilotPreparing, Piloting & Paths to Success with Microsoft Copilot
Preparing, Piloting & Paths to Success with Microsoft Copilot
Richard Harbridge
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python
amiable_indian
 
Data Visualization Techniques in Power BI
Data Visualization Techniques in Power BIData Visualization Techniques in Power BI
Data Visualization Techniques in Power BI
Angel Abundez
 
Introduction to data analysis using python
Introduction to data analysis using pythonIntroduction to data analysis using python
Introduction to data analysis using python
Guido Luz Percú
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
Nowell Strite
 
Introduction to Python Pandas for Data Analytics
Introduction to Python Pandas for Data AnalyticsIntroduction to Python Pandas for Data Analytics
Introduction to Python Pandas for Data Analytics
Phoenix
 
Python for Data Science | Python Data Science Tutorial | Data Science Certifi...
Python for Data Science | Python Data Science Tutorial | Data Science Certifi...Python for Data Science | Python Data Science Tutorial | Data Science Certifi...
Python for Data Science | Python Data Science Tutorial | Data Science Certifi...
Edureka!
 

Similar to Introduction to Python Programing (20)

Programming with Python: Week 1
Programming with Python: Week 1Programming with Python: Week 1
Programming with Python: Week 1
Ahmet Bulut
 
4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx
Gnanesh12
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unit
michaelaaron25322
 
Python intro
Python introPython intro
Python intro
Piyush rai
 
ITC 110 Week 10 Introdution to Python .pptx
ITC 110 Week 10  Introdution to Python .pptxITC 110 Week 10  Introdution to Python .pptx
ITC 110 Week 10 Introdution to Python .pptx
aaaaaannnnn6
 
Python Module-1.1.pdf
Python Module-1.1.pdfPython Module-1.1.pdf
Python Module-1.1.pdf
4HG19EC010HARSHITHAH
 
Python_Programming_PPT Basics of python programming language
Python_Programming_PPT   Basics of python programming languagePython_Programming_PPT   Basics of python programming language
Python_Programming_PPT Basics of python programming language
earningmoney9595
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Mohammed Rafi
 
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
HassanShah396906
 
PYTHON FEATURES.pptx
PYTHON FEATURES.pptxPYTHON FEATURES.pptx
PYTHON FEATURES.pptx
MaheShiva
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthrough
gabriellekuruvilla
 
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdf
VaibhavKumarSinghkal
 
An Introduction to PyPy
An Introduction to PyPyAn Introduction to PyPy
An Introduction to PyPy
Michael Hudson-Doyle
 
1-ppt-python.ppt
1-ppt-python.ppt1-ppt-python.ppt
1-ppt-python.ppt
ssusera99a83
 
Class_X_PYTHON_J.pdf
Class_X_PYTHON_J.pdfClass_X_PYTHON_J.pdf
Class_X_PYTHON_J.pdf
SanjeedaPraween
 
Python programming 2nd
Python programming 2ndPython programming 2nd
Python programming 2nd
Aishwarya Deshmukh
 
Python Programming.pdf
Python Programming.pdfPython Programming.pdf
Python Programming.pdf
ssuser9a6ca1
 
web programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Malothweb programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Maloth
Bhavsingh Maloth
 
Python slides for the beginners to learn
Python slides for the beginners to learnPython slides for the beginners to learn
Python slides for the beginners to learn
krishna43511
 
program on python what is python where it was started by whom started
program on python what is python where it was started by whom startedprogram on python what is python where it was started by whom started
program on python what is python where it was started by whom started
rajkumarmandal9391
 
Programming with Python: Week 1
Programming with Python: Week 1Programming with Python: Week 1
Programming with Python: Week 1
Ahmet Bulut
 
4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx
Gnanesh12
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unit
michaelaaron25322
 
ITC 110 Week 10 Introdution to Python .pptx
ITC 110 Week 10  Introdution to Python .pptxITC 110 Week 10  Introdution to Python .pptx
ITC 110 Week 10 Introdution to Python .pptx
aaaaaannnnn6
 
Python_Programming_PPT Basics of python programming language
Python_Programming_PPT   Basics of python programming languagePython_Programming_PPT   Basics of python programming language
Python_Programming_PPT Basics of python programming language
earningmoney9595
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Mohammed Rafi
 
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
HassanShah396906
 
PYTHON FEATURES.pptx
PYTHON FEATURES.pptxPYTHON FEATURES.pptx
PYTHON FEATURES.pptx
MaheShiva
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthrough
gabriellekuruvilla
 
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdf
VaibhavKumarSinghkal
 
Python Programming.pdf
Python Programming.pdfPython Programming.pdf
Python Programming.pdf
ssuser9a6ca1
 
web programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Malothweb programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Maloth
Bhavsingh Maloth
 
Python slides for the beginners to learn
Python slides for the beginners to learnPython slides for the beginners to learn
Python slides for the beginners to learn
krishna43511
 
program on python what is python where it was started by whom started
program on python what is python where it was started by whom startedprogram on python what is python where it was started by whom started
program on python what is python where it was started by whom started
rajkumarmandal9391
 
Ad

Recently uploaded (20)

Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
Ad

Introduction to Python Programing

  • 2. INTRODUCTION • C programing concern with functional aspect. We are concerning with writing code using function. • Programing will become easy if it based on real life example, hence they develop Object Oriented Language like Java and .NET where programing done with Classes and Objects. • Java Program to Write sum of two numbers • C program to write sum of two numbers • Python style • a=b=10 • print(“sum”,(a+b))
  • 3. HISTORY • Python was developed by Guido Van Rossum in year 1991, at center for mathematics and Computer science managed by Dutch Govt. • Developer was working on project to develop system utilities in C where he had interact with bourn shell available in UNIX. • Python name appeared from the TV Show Monty Python’s Flying Circus • Official launched on 20th Feb 1991. • Python is Open Source.
  • 4. FEATURES OF PYTHON • Simple • Easy to learn • Open Source • High level Language • Dynamically Typed • Platform Independence • Portable • procedure and Object oriented
  • 5. • Simple-Python is simple programing Language .felt like reading English sentences. It means more clarity and less stress on understating of syntax of language • Easy to learn – uses very few keyword , program structure is simple. Similar to C programing . Hence Migration from C to Python is easy for programmers. • Open Source - easily available for download www.python.org • High level Language – Similar to English Language , low level language Machine understandable code. • Dynamically Typed-in Python , we are not declaring anything.an assignment statement binds a name to an objects can be of any type. If a name is assigned to an objects of one type, it may be later be assigned to an objects of different type. • >>>year = 2017 • >>> dec = 1.1 • >>> hello = 'Hello, World!' • >>> alphabet = ['a','b','c']
  • 6. • But what ‘types’ are these variables? Let’s use the types module to find out: • >>> from types import * • >>> type(year) • <type 'int'> • >>> type(dec) • <type 'float'> • >>> type(hello) • <type 'str'> • >>> type(alphabet) • <type 'list'>
  • 7. • As you can see, I didn’t have to tell Python what ‘type’ each variable value was, it assigned the types dynamically • Platform Independent- • Portable • Procedure and OOPS based.
  • 8. • Class is collection of objects having similar attributes and operation. • Python Packages – • BOTO is amazon web services • CherryPy is Object oriented HTTP framework • Fiona reads and write big data files. • Mysql-connector –python is driver written in python to connect to MySQL database • Numpy-is a package for processing array of single or multidimensional type • Pandas is package for powerful data structure for data analysis, time series and statistics • Pillow is python imaging library. • Pyquery represent jquery like library for python. • W3lib is library of web related function.
  • 9. EXECUTION OF PYTHON PROGRAM • Python program can write in abc.py where abc is name of the program wheras .py is extension name. • Compile the program into python compiler. • Byte code. • Abc.pyc • Pvm • machinecode • result
  • 10. C VS PYTHON C programing Python Programing C program execute Faster Slower compared to C Type Declaration Compulsory Not required C language type discipline in static and weak Python type discipline is dynamic and Strong Pointers available No Pointers C ha s switch statements No switch statement Memory allocation using malloc and calloc Memory allocation and Deallocation done by PVM Procedural approch Oops based
  • 11. JAVA VS PYTHON JAVA PYTHON Memory allocation and deallocation done by JVM PVM Switch is allowed No switch A semicolon is used to terminate the statement and comma is used to separate expression. New line indicate end of statement and semicolon is used as an expression separator Array index is positive integer Can be positive or negative. Static and weak Dynamic and strong Oops languages, functional programing used in java 8.0 in lamda expression Oops language, blends functional programming with lambda expression inbuild.
  • 12. PVM • Python source file converted in Byte Code format. • Byte code represent the fixed set of instruction created by python developers representing all types of operations. • And store that file in .pyc extension • Role of PVM to convert that byte code into machine understandable code, so that computer can execute that machine code and display result. • To carry out this conversion , byte code into machine code and sends that machine code to computer processor for execution. Since Interpreter plays main role, often pvm also mention as interpreter.
  • 13. FROZEN BINARIES • Frozen binary executables are packages that combine your program's byte code and the Python interpreter into a single executable program. With these, programs can be launched in the same ways that you would launch any other executable program (icon clicks, command lines, etc.). • py2exe
  • 14. MEMORY MANAGEMENT IN PYTHON • Python , memory allocation and deallocation are done during runtime automatically. • The programmer need not allocate memory while creating objects or deallocate memory when deleting the objects. Python PVM take care of such issues. • Everything is consider as an objects in Python. Example Strings are objects, list are objects , functions are objects. • For every object, memory should be allocated .memory manager inside PVM allocates memory required for the objects created in Python Programming . • All these objects are stored on separate memory called Heap. • Heap is memory which allocated during runtime.
  • 15. GARBAGE COLLECTION IN PYTHON • Python’s memory allocation and deallocation method is automatic. • Python uses two strategies for memory allocation: • Reference counting • Garbage collection • the Python interpreter only used reference counting for memory management. Reference counting works by counting the number of times an object is referenced by other objects in the system. When references to an object are removed, the reference count for an object is decremented. When the reference count becomes zero, the object is deallocated.
  翻译: