SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
PHYTHON PROGRAMMING
SAMEER PATIL
Points To Remember
 Python was develop by Guido Van Rossum in 1991.
 Python is high level language that contain feature of functional programming language like C and
Object Oriented Programming Language like Java.
 A group of objects having same behavior comes under same class.
 Standard python compiler Is written in C language and hence called Cpython.
 There are other flavors of python namely Jpython, IronPython and Pypy.
 A python program contain source code that is first compiled by Python compiler to produce byte
code. This byte code is given to Python Virtual Machine which converts the byte code to machine
code so that processor will execute it and display result.
 Python byte code is set of instruction created by Python development team to represent all type
of operation. Each Byte code occupies 1 byte of memory and hence name Byte code.
 PVM is the software containing an interpreter that converts the byte code into machine code
depending on the OS and hardware of computer system where the python program runs.
 The standard PVM is most often called Python Interpreter
 PVM contains only an interpreter and hence Python is called an Interpreter Language
 The programmer need not allocate or deallocate memory in Python. It is the duty of PVM to
allocate or deallocate memory for python program.
 Memory manager is a module in PVM which will allocate memory for objects. Garbage collector is
another module in PVM that will deallocate memory for unused objects.
 The programmer need not call the Garbage collector. It will execute automatically when the
python program is running in memory.
 In addition ,the programmer can also call the garbage collector whenever needed.
 The files that contain Python Program along with Python compiler and libraries that can be
executed directly are called as Frozen binaries.
 The PY_COMPILE module converts a python source file into a .pyc file that contain byte code
instruction. Generally .pyc files are provided to the end user.
Data Types in Python
 Comments in Python
Single line comments
Multiline Comments
DocString- if we are write string inside multiline comments and if these are written as
first statements in a module ,function ,class or methods, then these string are call
DocString.
Api documentation
Example
Python –m pydoc –w demo for api documents
How Python sees Variable
Data types in Python
None Type
Numeric Type
Sequence type
Sets
Mapping
None type
 The none datatype represent an object that doesn't contain any value. In java
it refer as Null whereas in Python it called as None.
 In python program maximum of only one none value is provided.
 It is used inside the function as default value of arguments.
 None datatypes is known as false.
Numeric Type
There are three sub type
Int , float, complex
Int no max upper limit .
Float value also can written in exponential format
Complex Data types- number format is like this a+bj or a+bJ.
Here a is real and b is imaginary
Binary octal and Hexadecimal code

More Related Content

PPTX
Introduction to python for Beginners
PPTX
Introduction to Python Programing
PDF
Introduction to python
PPTX
Python - An Introduction
PDF
Python quick guide1
PDF
Python course syllabus
PPTX
Programming
PPTX
Introduction to Python Basics Programming
Introduction to python for Beginners
Introduction to Python Programing
Introduction to python
Python - An Introduction
Python quick guide1
Python course syllabus
Programming
Introduction to Python Basics Programming

What's hot (20)

PPTX
Python | What is Python | History of Python | Python Tutorial
PPT
Introduction to python
PPTX
Python Tutorial Part 2
PDF
Python Crash Course
PPT
Intro to Python
PDF
Python: the Project, the Language and the Style
PPTX
Basics of python
KEY
Programming with Python: Week 1
PPTX
Beginning Python Programming
PPTX
Presentation on python
PDF
Python Programming - I. Introduction
PPTX
Python Seminar PPT
PDF
Python final ppt
PPTX
Introduction python
PDF
Python for All
PDF
Why learn python in 2017?
PPTX
Python-00 | Introduction and installing
PPT
Mixing Python and Java
PPTX
Why Python?
Python | What is Python | History of Python | Python Tutorial
Introduction to python
Python Tutorial Part 2
Python Crash Course
Intro to Python
Python: the Project, the Language and the Style
Basics of python
Programming with Python: Week 1
Beginning Python Programming
Presentation on python
Python Programming - I. Introduction
Python Seminar PPT
Python final ppt
Introduction python
Python for All
Why learn python in 2017?
Python-00 | Introduction and installing
Mixing Python and Java
Why Python?
Ad

Similar to Python Programming (20)

DOCX
Python notes compilation (4).docx
DOCX
Python introduction
PPTX
Introduction to Programming.pptx ok ok ok
PPTX
Introduction to python
PDF
Free Python Notes PDF - Python Crash Course
PPTX
Python introduction towards data science
PPTX
2024-25 TYBSC(CS)-PYTHON_PROG_ControlStructure.pptx
PPTX
Python basics
PDF
web programming UNIT VIII python by Bhavsingh Maloth
PPTX
Docketrun's Python Course for beginners.pptx
PPTX
Lecture on Fundamentals of Python Programming-1
PPTX
Python Tutorial for Beginner
PDF
PPTX
Python-Beginer-PartOnePython is one of the top programming languages in the w...
PPTX
Python intro
PPT
python introduction all the students.ppt
PPTX
Python programming
Python notes compilation (4).docx
Python introduction
Introduction to Programming.pptx ok ok ok
Introduction to python
Free Python Notes PDF - Python Crash Course
Python introduction towards data science
2024-25 TYBSC(CS)-PYTHON_PROG_ControlStructure.pptx
Python basics
web programming UNIT VIII python by Bhavsingh Maloth
Docketrun's Python Course for beginners.pptx
Lecture on Fundamentals of Python Programming-1
Python Tutorial for Beginner
Python-Beginer-PartOnePython is one of the top programming languages in the w...
Python intro
python introduction all the students.ppt
Python programming
Ad

Recently uploaded (20)

PDF
Well-logging-methods_new................
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPT
Mechanical Engineering MATERIALS Selection
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
additive manufacturing of ss316l using mig welding
PDF
PPT on Performance Review to get promotions
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
composite construction of structures.pdf
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Current and future trends in Computer Vision.pptx
PPTX
Sustainable Sites - Green Building Construction
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
III.4.1.2_The_Space_Environment.p pdffdf
Well-logging-methods_new................
Internet of Things (IOT) - A guide to understanding
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Mechanical Engineering MATERIALS Selection
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
CYBER-CRIMES AND SECURITY A guide to understanding
additive manufacturing of ss316l using mig welding
PPT on Performance Review to get promotions
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
composite construction of structures.pdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
OOP with Java - Java Introduction (Basics)
Model Code of Practice - Construction Work - 21102022 .pdf
Current and future trends in Computer Vision.pptx
Sustainable Sites - Green Building Construction
Foundation to blockchain - A guide to Blockchain Tech
R24 SURVEYING LAB MANUAL for civil enggi
Embodied AI: Ushering in the Next Era of Intelligent Systems
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
III.4.1.2_The_Space_Environment.p pdffdf

Python Programming

  • 2. Points To Remember  Python was develop by Guido Van Rossum in 1991.  Python is high level language that contain feature of functional programming language like C and Object Oriented Programming Language like Java.  A group of objects having same behavior comes under same class.  Standard python compiler Is written in C language and hence called Cpython.  There are other flavors of python namely Jpython, IronPython and Pypy.  A python program contain source code that is first compiled by Python compiler to produce byte code. This byte code is given to Python Virtual Machine which converts the byte code to machine code so that processor will execute it and display result.  Python byte code is set of instruction created by Python development team to represent all type of operation. Each Byte code occupies 1 byte of memory and hence name Byte code.  PVM is the software containing an interpreter that converts the byte code into machine code depending on the OS and hardware of computer system where the python program runs.
  • 3.  The standard PVM is most often called Python Interpreter  PVM contains only an interpreter and hence Python is called an Interpreter Language  The programmer need not allocate or deallocate memory in Python. It is the duty of PVM to allocate or deallocate memory for python program.  Memory manager is a module in PVM which will allocate memory for objects. Garbage collector is another module in PVM that will deallocate memory for unused objects.  The programmer need not call the Garbage collector. It will execute automatically when the python program is running in memory.  In addition ,the programmer can also call the garbage collector whenever needed.  The files that contain Python Program along with Python compiler and libraries that can be executed directly are called as Frozen binaries.  The PY_COMPILE module converts a python source file into a .pyc file that contain byte code instruction. Generally .pyc files are provided to the end user.
  • 4. Data Types in Python  Comments in Python Single line comments Multiline Comments DocString- if we are write string inside multiline comments and if these are written as first statements in a module ,function ,class or methods, then these string are call DocString. Api documentation Example Python –m pydoc –w demo for api documents
  • 5. How Python sees Variable Data types in Python None Type Numeric Type Sequence type Sets Mapping
  • 6. None type  The none datatype represent an object that doesn't contain any value. In java it refer as Null whereas in Python it called as None.  In python program maximum of only one none value is provided.  It is used inside the function as default value of arguments.  None datatypes is known as false.
  • 7. Numeric Type There are three sub type Int , float, complex Int no max upper limit . Float value also can written in exponential format Complex Data types- number format is like this a+bj or a+bJ. Here a is real and b is imaginary
  • 8. Binary octal and Hexadecimal code