SlideShare una empresa de Scribd logo
1 de 16
1
PRESENTATION ON PYTHON
By Rohit Kumar Verma
B. Tech (CSE)
2
Intorduction
 Python is a general purpose high level programming language.
 Python was developed by Guido Van Rossam in 1989 while working at
National Research Institute at Netherlands.
 But officially Python was made available to public in 1991. The official Date
of Birth for Python is : Feb 20th 1991.
 Python is recommended as first programming language for beginners.
 It is interpreted , object oriented and procudural language
 Python language is being used by almost all tech-giant companies like –
Google, Amazon, Facebook, Instagram, Dropbox, Uber… etc.
 There are two major Python versions- Python 2 and Python 3. Both are quite
different.
3
Program to add two no.
Java program
public class Add{
pulic static void main(String []args){
Int a,b;
a=10;
b=20;
System.out.println(“Addition is =”+(a+b))
}
}
C-Program
void main()
{
int a,b;
a =10;
b=20;
printf("The Sum:%d",(a+b));
}
Python program
a,b=10,20
print(“the sum is =”,(a+b))
4
Guido developed Python language by taking almost all programming features from
different languages
1. Functional Programming Features from C .
2. Object Oriented Programming Features from C++ .
3. Scripting Language Features from Perl and Shell Script .
4. Modular Programming Features from Modula-3 .
5. Most of syntax in Python Derived from C and ABC languages.
5
Where we can use python
We can use everywhere. The most common important application areas are
1) For developing Desktop Applications
2) For developing web Applications
3) For developing database Applications
4) For Network Programming
5) For developing games
6) For Data Analysis Applications
7) For Machine Learning
8) For developing Artificial Intelligence Applications
9) For IoT
6
Features of Python
 Simple and easy to learn
 Open source
 High level Programming language
 Platform Independent
 Portability
 Dynamically Typed
 Both Procedural Oriented and Object Oriented
 Interpreted
 Extensible
 Embedded
 Extensive Library
7
Python version
 Python 1.0V introduced in Jan 1994
 Python 2.0V introduced in October 2000
 Python 3.0V introduced in December 2008
 Current version of python 3.8.0, documentation released on 14
October 2019.
Note: Python 3 won't provide backward compatibility to Python2 i.e
there is no guarantee that Python2 programs will run in Python3.
8
Reserved Words in Python
 In Python some words are reserved to represent some meaning or functionality.
Such types of words are called reserved words.
 There are 33 reserved words available in Python.
True, False, None
and, or ,not,is
if, elif, else
while, for, break, continue, return, in, yield
try, except, finally, raise, assert
import, from, as, class, def, pass, global, nonlocal, lambda, del, with
Note:
1. All Reserved words in Python contain only alphabet symbols.
2. Except the following 3 reserved words, all contain only lower case alphabet symbols
True,False,None
9
Data Type in Python
 Data type represent the type of data present inside a variable
 In python , Based on value provided , the type will be automatically assigned .
Python contain following inbuilt datatype
Int Float Complex Bool
Str Bytes Bytearray Range
List Tuple Set Frozenset
Dict None
10
Operators in python
 Arithmetic Operator ( + , - , / , * , % , // , ** )
 Relational Operator ( > , < , <= , >= )
 Equality operator( == , != )
 Logical Operator( and , or , not )
 Bitwise Operator ( & , | , ^ , ~ , << , >> )
 Assignment Operator ( += , -= , /= , *= , %= , //= , **= ,&= , |= , ^= , << =, >>=)
 Special operator and member operator(is ,in)
Operator chaining
10<20<30<40 True 10<20<60<50 False
possible in relational operator and equality operator (==)
11
Decorator
Decorator is a fuction which take fuction as argument and extends its functionality and return modified function
def hello_decorator(func):
def inner1():
print("Hello, this is before function execution")
func()
print("This is after function execution")
return inner1
@hello_decorator or function_to_be_used = hello_decorator(function_to_be_used)
def function_to_be_used():
print("This is inside the function !!")
function_to_be_used()
Output:
Hello, this is before function execution
This is inside the function !!
This is after function execution
12
Generator
 A Function which is used to generate sequence of values .
 It is similar to ordinary function
 It uses yield keyword to return sequence values
def simpleGeneratorFun():
yield 1
yield 2
yield 3
for value in simpleGeneratorFun():
print(value)
Output :-
1
2
3
13
Zipping and Unzipping files
 To perform zipping operation
create zip file class object with name of zip file
f = ZipFile(“files.zip”,”w”,”ZIP_DEFLATED”)
Now, we can add files by using write() method
f.write(filename)
 To perform unzip operation
f=ZipFile(“files.zip”,” r ”, ZIP_STORED )
now , we can get all files names present in that zip file by using namelist() method
names = f.namelist()
14
Working With Dorectories
 python provides inbuilt module os , which contain several function to perform directories related operation
 To know current working directory
cwd = os.getcwd()
 To created sub directory in the current working directory
os.mkdir(“dirName”)
 To create multiple subdirectories like sub1 in that sub2 in that sub3
os.makedirs(“sub1/sub2/sub3”)
 To remove directoriy
os.rmdir(“name”)
 To rename the directory
os.rename(“mysub”,”newdir”)
15
__name__ , __init__
__name__
 Since there is no main() function in Python, when the command to run a python program
is given to the interpreter, the code that is at level 0 indentation is to be executed.
__name__ special variable and it has two values
1. __main__ ( if program is executed as indivisual program )
2.module’s name (it the program is executed as module from another program)
__init__
 if a folder or directory contain __init__.py file , is considered as a python package.
 __init__ is used for constructor of a class
16
Python Limitations
 Performance and Speed
 Incompatibility of Two Versions
 Requires Additional Testing
 Not use for mobile applications

Más contenido relacionado

La actualidad más candente

Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An IntroductionSwarit Wadhe
 
Python | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python TutorialPython | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python TutorialQA TrainingHub
 
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
 
File Handling Python
File Handling PythonFile Handling Python
File Handling PythonAkhil Kaushik
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming LanguageDr.YNM
 
File handling in Python
File handling in PythonFile handling in Python
File handling in PythonMegha V
 
Basic Concepts in Python
Basic Concepts in PythonBasic Concepts in Python
Basic Concepts in PythonSumit Satam
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPTShivam Gupta
 
Python PPT
Python PPTPython PPT
Python PPTEdureka!
 
Data types in python
Data types in pythonData types in python
Data types in pythonRaginiJain21
 
Packages In Python Tutorial
Packages In Python TutorialPackages In Python Tutorial
Packages In Python TutorialSimplilearn
 
programming with python ppt
programming with python pptprogramming with python ppt
programming with python pptPriyanka Pradhan
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners Sujith Kumar
 
Python and its Applications
Python and its ApplicationsPython and its Applications
Python and its ApplicationsAbhijeet Singh
 

La actualidad más candente (20)

Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
 
Python | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python TutorialPython | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python Tutorial
 
Chapter 03 python libraries
Chapter 03 python librariesChapter 03 python libraries
Chapter 03 python libraries
 
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
Introduction to Python  Introduction to Python
Introduction to Python
 
File Handling Python
File Handling PythonFile Handling Python
File Handling Python
 
Python ppt
Python pptPython ppt
Python ppt
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
 
File handling in Python
File handling in PythonFile handling in Python
File handling in Python
 
Basics of python
Basics of pythonBasics of python
Basics of python
 
Basic Concepts in Python
Basic Concepts in PythonBasic Concepts in Python
Basic Concepts in Python
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPT
 
Python PPT
Python PPTPython PPT
Python PPT
 
Data types in python
Data types in pythonData types in python
Data types in python
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Packages In Python Tutorial
Packages In Python TutorialPackages In Python Tutorial
Packages In Python Tutorial
 
programming with python ppt
programming with python pptprogramming with python ppt
programming with python ppt
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
 
Python
PythonPython
Python
 
Python and its Applications
Python and its ApplicationsPython and its Applications
Python and its Applications
 

Similar a Python ppt

First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python ProgrammingDozie Agbo
 
Interview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdfInterview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdfExaminationSectionMR
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answersRojaPriya
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...DRVaibhavmeshram1
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answerskavinilavuG
 
introduction of python in data science
introduction of python in data scienceintroduction of python in data science
introduction of python in data sciencebhavesh lande
 
Functions_in_Python.pptx
Functions_in_Python.pptxFunctions_in_Python.pptx
Functions_in_Python.pptxkrushnaraj1
 
Python Interview Questions For Experienced
Python Interview Questions For ExperiencedPython Interview Questions For Experienced
Python Interview Questions For Experiencedzynofustechnology
 
An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAdam Getchell
 
Python intro
Python introPython intro
Python introrik0
 
unit (1)INTRODUCTION TO PYTHON course.pptx
unit (1)INTRODUCTION TO PYTHON course.pptxunit (1)INTRODUCTION TO PYTHON course.pptx
unit (1)INTRODUCTION TO PYTHON course.pptxusvirat1805
 
Coding in GO - GDG SL - NSBM
Coding in GO - GDG SL - NSBMCoding in GO - GDG SL - NSBM
Coding in GO - GDG SL - NSBMRaveen Perera
 

Similar a Python ppt (20)

First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python Programming
 
Python for dummies
Python for dummiesPython for dummies
Python for dummies
 
Pythonpresent
PythonpresentPythonpresent
Pythonpresent
 
Introduction of Python
Introduction of PythonIntroduction of Python
Introduction of Python
 
Pyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdfPyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdf
 
Interview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdfInterview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdf
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answers
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answers
 
Spsl iv unit final
Spsl iv unit  finalSpsl iv unit  final
Spsl iv unit final
 
Spsl iv unit final
Spsl iv unit  finalSpsl iv unit  final
Spsl iv unit final
 
introduction of python in data science
introduction of python in data scienceintroduction of python in data science
introduction of python in data science
 
Functions_in_Python.pptx
Functions_in_Python.pptxFunctions_in_Python.pptx
Functions_in_Python.pptx
 
Python Interview Questions For Experienced
Python Interview Questions For ExperiencedPython Interview Questions For Experienced
Python Interview Questions For Experienced
 
An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional Programming
 
Python and You Series
Python and You SeriesPython and You Series
Python and You Series
 
Python intro
Python introPython intro
Python intro
 
unit (1)INTRODUCTION TO PYTHON course.pptx
unit (1)INTRODUCTION TO PYTHON course.pptxunit (1)INTRODUCTION TO PYTHON course.pptx
unit (1)INTRODUCTION TO PYTHON course.pptx
 
Python Course.docx
Python Course.docxPython Course.docx
Python Course.docx
 
Coding in GO - GDG SL - NSBM
Coding in GO - GDG SL - NSBMCoding in GO - GDG SL - NSBM
Coding in GO - GDG SL - NSBM
 

Más de Rohit Verma

Containerization and version control system
Containerization and version control systemContainerization and version control system
Containerization and version control systemRohit Verma
 
Library manaementreport1
Library manaementreport1Library manaementreport1
Library manaementreport1Rohit Verma
 
Blockchain tutorial
Blockchain tutorial Blockchain tutorial
Blockchain tutorial Rohit Verma
 
blockchain unit 3
blockchain unit 3blockchain unit 3
blockchain unit 3Rohit Verma
 
Use case of block chain unit 4 AKTU
Use case of block chain unit 4 AKTUUse case of block chain unit 4 AKTU
Use case of block chain unit 4 AKTURohit Verma
 
Hyper ledger febric
Hyper ledger febricHyper ledger febric
Hyper ledger febricRohit Verma
 
java 8 new features
java 8 new features java 8 new features
java 8 new features Rohit Verma
 

Más de Rohit Verma (7)

Containerization and version control system
Containerization and version control systemContainerization and version control system
Containerization and version control system
 
Library manaementreport1
Library manaementreport1Library manaementreport1
Library manaementreport1
 
Blockchain tutorial
Blockchain tutorial Blockchain tutorial
Blockchain tutorial
 
blockchain unit 3
blockchain unit 3blockchain unit 3
blockchain unit 3
 
Use case of block chain unit 4 AKTU
Use case of block chain unit 4 AKTUUse case of block chain unit 4 AKTU
Use case of block chain unit 4 AKTU
 
Hyper ledger febric
Hyper ledger febricHyper ledger febric
Hyper ledger febric
 
java 8 new features
java 8 new features java 8 new features
java 8 new features
 

Último

(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 

Último (20)

(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 

Python ppt

  • 1. 1 PRESENTATION ON PYTHON By Rohit Kumar Verma B. Tech (CSE)
  • 2. 2 Intorduction  Python is a general purpose high level programming language.  Python was developed by Guido Van Rossam in 1989 while working at National Research Institute at Netherlands.  But officially Python was made available to public in 1991. The official Date of Birth for Python is : Feb 20th 1991.  Python is recommended as first programming language for beginners.  It is interpreted , object oriented and procudural language  Python language is being used by almost all tech-giant companies like – Google, Amazon, Facebook, Instagram, Dropbox, Uber… etc.  There are two major Python versions- Python 2 and Python 3. Both are quite different.
  • 3. 3 Program to add two no. Java program public class Add{ pulic static void main(String []args){ Int a,b; a=10; b=20; System.out.println(“Addition is =”+(a+b)) } } C-Program void main() { int a,b; a =10; b=20; printf("The Sum:%d",(a+b)); } Python program a,b=10,20 print(“the sum is =”,(a+b))
  • 4. 4 Guido developed Python language by taking almost all programming features from different languages 1. Functional Programming Features from C . 2. Object Oriented Programming Features from C++ . 3. Scripting Language Features from Perl and Shell Script . 4. Modular Programming Features from Modula-3 . 5. Most of syntax in Python Derived from C and ABC languages.
  • 5. 5 Where we can use python We can use everywhere. The most common important application areas are 1) For developing Desktop Applications 2) For developing web Applications 3) For developing database Applications 4) For Network Programming 5) For developing games 6) For Data Analysis Applications 7) For Machine Learning 8) For developing Artificial Intelligence Applications 9) For IoT
  • 6. 6 Features of Python  Simple and easy to learn  Open source  High level Programming language  Platform Independent  Portability  Dynamically Typed  Both Procedural Oriented and Object Oriented  Interpreted  Extensible  Embedded  Extensive Library
  • 7. 7 Python version  Python 1.0V introduced in Jan 1994  Python 2.0V introduced in October 2000  Python 3.0V introduced in December 2008  Current version of python 3.8.0, documentation released on 14 October 2019. Note: Python 3 won't provide backward compatibility to Python2 i.e there is no guarantee that Python2 programs will run in Python3.
  • 8. 8 Reserved Words in Python  In Python some words are reserved to represent some meaning or functionality. Such types of words are called reserved words.  There are 33 reserved words available in Python. True, False, None and, or ,not,is if, elif, else while, for, break, continue, return, in, yield try, except, finally, raise, assert import, from, as, class, def, pass, global, nonlocal, lambda, del, with Note: 1. All Reserved words in Python contain only alphabet symbols. 2. Except the following 3 reserved words, all contain only lower case alphabet symbols True,False,None
  • 9. 9 Data Type in Python  Data type represent the type of data present inside a variable  In python , Based on value provided , the type will be automatically assigned . Python contain following inbuilt datatype Int Float Complex Bool Str Bytes Bytearray Range List Tuple Set Frozenset Dict None
  • 10. 10 Operators in python  Arithmetic Operator ( + , - , / , * , % , // , ** )  Relational Operator ( > , < , <= , >= )  Equality operator( == , != )  Logical Operator( and , or , not )  Bitwise Operator ( & , | , ^ , ~ , << , >> )  Assignment Operator ( += , -= , /= , *= , %= , //= , **= ,&= , |= , ^= , << =, >>=)  Special operator and member operator(is ,in) Operator chaining 10<20<30<40 True 10<20<60<50 False possible in relational operator and equality operator (==)
  • 11. 11 Decorator Decorator is a fuction which take fuction as argument and extends its functionality and return modified function def hello_decorator(func): def inner1(): print("Hello, this is before function execution") func() print("This is after function execution") return inner1 @hello_decorator or function_to_be_used = hello_decorator(function_to_be_used) def function_to_be_used(): print("This is inside the function !!") function_to_be_used() Output: Hello, this is before function execution This is inside the function !! This is after function execution
  • 12. 12 Generator  A Function which is used to generate sequence of values .  It is similar to ordinary function  It uses yield keyword to return sequence values def simpleGeneratorFun(): yield 1 yield 2 yield 3 for value in simpleGeneratorFun(): print(value) Output :- 1 2 3
  • 13. 13 Zipping and Unzipping files  To perform zipping operation create zip file class object with name of zip file f = ZipFile(“files.zip”,”w”,”ZIP_DEFLATED”) Now, we can add files by using write() method f.write(filename)  To perform unzip operation f=ZipFile(“files.zip”,” r ”, ZIP_STORED ) now , we can get all files names present in that zip file by using namelist() method names = f.namelist()
  • 14. 14 Working With Dorectories  python provides inbuilt module os , which contain several function to perform directories related operation  To know current working directory cwd = os.getcwd()  To created sub directory in the current working directory os.mkdir(“dirName”)  To create multiple subdirectories like sub1 in that sub2 in that sub3 os.makedirs(“sub1/sub2/sub3”)  To remove directoriy os.rmdir(“name”)  To rename the directory os.rename(“mysub”,”newdir”)
  • 15. 15 __name__ , __init__ __name__  Since there is no main() function in Python, when the command to run a python program is given to the interpreter, the code that is at level 0 indentation is to be executed. __name__ special variable and it has two values 1. __main__ ( if program is executed as indivisual program ) 2.module’s name (it the program is executed as module from another program) __init__  if a folder or directory contain __init__.py file , is considered as a python package.  __init__ is used for constructor of a class
  • 16. 16 Python Limitations  Performance and Speed  Incompatibility of Two Versions  Requires Additional Testing  Not use for mobile applications