SlideShare a Scribd company logo
1 of 31
Online Presentation on
Learn Python: Python for
beginners
Presented by
Prof. DharmeshTank
CE / IT Department
09-May-2020
Outline
 What and Why Python?
 Installation of Python
 Editors used for Python
 Variable declaration, Numbers & Data types
 Operators, String, List,Tuples, Dictionary
 Conditional Statements
 Looping Statements
 Application of Python language
 Conclusion
What is
Python?
Python is an interpreted, object-
oriented, high-level programming
language with dynamic semantics.
Source: https://www.python.org/
Why Python?
 It is portable, expandable, and embeddable.
 It can easily managing and organizing complex data.
 It’s syntax are clean.
 Python is the language of choice for the Machine Learning,
AI, Data Science, Raspberry Pi.
 Python offers tools that streamline the IoT development
process, such as webrepl.
 Since Python is an interpreted language, you can easily
test your solution without compiling the code or flashing
the device.
Features of
Python
Source: https://www.data-flair.training%2Fblogs%2Ffeatures-of-python%2F&psig=AOvVaw 2UNLNd8CUxNHuaHfuDj_-
s&ust=1589017513177810
Installation of
Python
Source: https://www.python.org/downloads/
EditorsUsed
for Python
 Python IDLE
 SublimeText
 Atom
 Jupiter
 PyDev
 Anaconda
 PyCharm
 Spyder
 Visual Studio IDE
 Vi /Vim (Used in Linux)
 Thonny (Used in Linux)
Source: www.datacamp.com%2Fcommunity%2Ftutorials%2Ftop-python-ides-for-2019&psig=AOvVaw0bp2ioDTCGM
Variable
declaration &
Data types
• What are the different data types in Python ?
In Python, data types are broadly classified into the
following:
1. Numbers
2. List
3.Tuple
4. Strings
5. Dictionary
• How to define a variable?
Syntax: VariableName = value
Example: phoneNo = 12345
Marks = 85.45
• How to comments?
Syntax: #variableName = value
Example: >>> # a=10
Operators
1. Assignment Operator (‘=‘)
2. Arithmetic Operators
 Multiplication (‘*’)
 Division (‘/‘)
 Addition (‘+’)
 Subtraction (‘-‘)
 Modulo (‘%’)
3. Relational or Comparison Operators
 Equal to (‘==‘) , Greater than (‘>’), Lesser than (‘<‘) ,
Greater than or equal to (‘>=’) , Lesser than or equal to
(‘<=‘), Not equal to (!=)
4. Logical Operators
 and -> Example: ((5 > 3) and (3 < 5)) True
 or -> Example: ((5 < 3) or (3 < 5)) True
 not -> Example: not (5<3) returnsTrue (reverse of
False).
Implementation
String
 How to define a string ?
Syntax :
stringName = “string”or stringName = ‘string’
Example:
programmingLanguage = “Python”
or
programmingLanguage = ‘Python’
 The starting index of any string is zero.
Implementation
ofString in
Python
String In-built
function
 upper() -
Syntax : stringName.upper()
 lower() -
Syntax : stringName.lower()
 replace() -
Syntax: stringName.replace(“Old Str”, “New Str”)
 length -
Syntax: len(stringName)
Implementation
ofString
Function in
Python
List
 A list is a container that holds many objects under a
single name.
Syntax : listName = [object1, object2, object3]
Example: fruit = [‘Apple', ‘Mango', ‘Orange’]
 It is same as array in C, C++ or JAVA.
 To access the list :
Example : fruit[0] = Apple, fruit[1] = Mango,
fruit[2] = Orange
ListOperations
 append() - To append any value in list
Syntax : list.append(element)
 insert() - To Insert at specific place in list
Syntax : list.insert(index, element)
 remove() - To remove the element from list
Syntax: list.remove(element)
 sort -To sort the list in ascending order
Syntax: list.sort()
 reverse -To reverse the list
Syntax: list.reverse()
 pop -To delete the specific index value
Syntax: list.pop(index)
Implementation
of List
Functions
Tuples
• A tuple is a container that holds many objects under a single
name.
• A tuple is immutable which means, a tuple once defined
cannot be modified.
Syntax : tupleName = (object1, object2, object3)
Example: ImpDate = (“11-09-1989”, “13-2-2020”)
• To access the values in a tuple
>>> ImpDate[1]
>>>13-2-2020
• To delete a tuple
Syntax: del(tupleName)
Example: del(ImpDate)
Dictionary
• A dictionary is a set of key-value pairs referenced by a
single name.
Syntax : dictionaryName = {“keyOne” : “valueOne”,
“keyTwo”: “valueTwo”}
Example:>>> colorOfFruits = {“apple”: “red”,
“mango”: “yellow”, “orange”: “orange”}
• To Retrieve the value of dictionary
Syntax: dictionaryName[“key”]
Example: >>>colorOfFruits[“mango”]
>>>yellow
Dictionary
inbuilt
Functions
 List all keys : keys() is used to list all the keys in a dictionary.
Syntax: dictionaryName.keys()
 List all values : values() is used to list all the values in a dictionary
Syntax: dictionaryName.values()
 Delete a key-value pair : del keyword is used to delete a key-
value pair from a dictionary
Syntax: del dictionaryName[“key”]
 Copy a dictionary into another : is used to copy the contents of
one dictionary to another
Syntax: dictionaryTwo = dictionaryOne.copy()
 Clear a dictionary: is used to clear the contents of a dictionary
and make it empty .
Implementation
of Dictionary &
It’s Functions
 Condition statements are a block of
statements whose execution depends on a
certain condition.
 Indentation play a very important role over
here.
 Different type of condition statements:
1. If statement
2. If-else statement
3. If-elif-else statement
4. Nested if
Control
Statement
(Condition)
Implementation
ofCondition
Statement
1. If statement
2. If-else statement
Indentation
Continue…. 4. Nested if statement
3. If-elif-else statement
 Loop statements : Looping is used to repeatedly
perform a block of statements over and over again.
 Different type of loop statements:
1. For loop
2. While loop
Control
Statement
(Loop)
1. For loop
statement
• The number of iterations to
be performed depends upon
the length of the list
• Syntax:
for count in list:
statement 1
statement 2…
statement n
• Here count is a iterative
variable who’s value start
from first value of the list .
• And, list is the array in
python.
• end = ‘ ’ is used to end the
print statement with a
white space instead of a
new line.
2.While loop
statement
• It repeatedly execute a
block of statements as long
as the condition mentioned
holds true.
Syntax:
while condition:
statement 1
statement 2…
statement n
• Here condition is used to
control the statement.
• while True: statement used
for infinite no of iteration.
Additional
Statement
 Break: A break
statement is used to
stop a loop from
further execution.
 Example:
>>>len=1
>>>while len>0:
if len == 3:
break
print(len)
len=len+1
 Else:The block of
statements in the else
block gets executed if
the break statement
in the looping
condition was
executed.
 Example:
>>> len=1
>>>while len<=3:
if len ==5:
break
print(len)
len=len+1
else:
print(“Break
statement was
executed”)
 Continue: Continue
statement is used to
skip a particular
iteration of the loop.
 Example:
>>> len = 1
>>>while len<=4:
if len ==2:
len=len+1
continue
print(len)
len=len+1
Application of
Python
Source: https://www.fiverr.com/
Real world
Application of
Python
 BitTorrent is made up in Python
 Web and Internet Development
 Scientific and Numeric: SciPy, Pandas, Ipython
 Business Applications : Odoo, Tryton
Source: topdevelopers.co%2Fblog%2F10-reasons-to-choose-python-web-development-project%2F&psig=AOvVaw
2drpI11_4MB70 UCf_c7W0S&ust=1589011542035214
Thank you
&
Suggestions or
Any Questions

More Related Content

What's hot

Seminar report on python 3 course
Seminar report on python 3 courseSeminar report on python 3 course
Seminar report on python 3 courseHimanshuPanwar38
 
introduction to Python (for beginners)
introduction to Python (for beginners)introduction to Python (for beginners)
introduction to Python (for beginners)guobichrng
 
Python final presentation kirti ppt1
Python final presentation kirti ppt1Python final presentation kirti ppt1
Python final presentation kirti ppt1Kirti Verma
 
Java package
Java packageJava package
Java packageCS_GDRCST
 
Introduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonIntroduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonPro Guide
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming LanguageTahani Al-Manie
 
Python programming
Python programmingPython programming
Python programmingMegha V
 
Python: Modules and Packages
Python: Modules and PackagesPython: Modules and Packages
Python: Modules and PackagesDamian T. Gordon
 
1.python interpreter and interactive mode
1.python interpreter and interactive mode1.python interpreter and interactive mode
1.python interpreter and interactive modeManjuA8
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streamsbabak danyal
 
Data Structures in Python
Data Structures in PythonData Structures in Python
Data Structures in PythonDevashish Kumar
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythoneShikshak
 

What's hot (20)

Introduction to python
 Introduction to python Introduction to python
Introduction to python
 
Seminar report on python 3 course
Seminar report on python 3 courseSeminar report on python 3 course
Seminar report on python 3 course
 
introduction to Python (for beginners)
introduction to Python (for beginners)introduction to Python (for beginners)
introduction to Python (for beginners)
 
Python final presentation kirti ppt1
Python final presentation kirti ppt1Python final presentation kirti ppt1
Python final presentation kirti ppt1
 
Java package
Java packageJava package
Java package
 
Python ppt
Python pptPython ppt
Python ppt
 
Introduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonIntroduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of Python
 
Python basics
Python basicsPython basics
Python basics
 
Python basic
Python basicPython basic
Python basic
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming Language
 
Python programming
Python programmingPython programming
Python programming
 
Python: Modules and Packages
Python: Modules and PackagesPython: Modules and Packages
Python: Modules and Packages
 
Python programming
Python  programmingPython  programming
Python programming
 
Python file handling
Python file handlingPython file handling
Python file handling
 
1.python interpreter and interactive mode
1.python interpreter and interactive mode1.python interpreter and interactive mode
1.python interpreter and interactive mode
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streams
 
Programming
ProgrammingProgramming
Programming
 
Data Structures in Python
Data Structures in PythonData Structures in Python
Data Structures in Python
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 

Similar to Basic of Python- Hands on Session

Get started python programming part 1
Get started python programming   part 1Get started python programming   part 1
Get started python programming part 1Nicholas I
 
Introduction to Python for Data Science and Machine Learning
Introduction to Python for Data Science and Machine Learning Introduction to Python for Data Science and Machine Learning
Introduction to Python for Data Science and Machine Learning ParrotAI
 
Automation Testing theory notes.pptx
Automation Testing theory notes.pptxAutomation Testing theory notes.pptx
Automation Testing theory notes.pptxNileshBorkar12
 
FUNDAMENTALS OF PYTHON LANGUAGE
 FUNDAMENTALS OF PYTHON LANGUAGE  FUNDAMENTALS OF PYTHON LANGUAGE
FUNDAMENTALS OF PYTHON LANGUAGE Saraswathi Murugan
 
Python Decision Making And Loops.pdf
Python Decision Making And Loops.pdfPython Decision Making And Loops.pdf
Python Decision Making And Loops.pdfNehaSpillai1
 
Top Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdfTop Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdfDatacademy.ai
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdfsamiwaris2
 
IoT-Week1-Day1-Lab.pptx
IoT-Week1-Day1-Lab.pptxIoT-Week1-Day1-Lab.pptx
IoT-Week1-Day1-Lab.pptxafsheenfaiq2
 
Python (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizePython (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizeIruolagbePius
 
Python introduction
Python introductionPython introduction
Python introductionleela rani
 
Python_Haegl.powerpoint presentation. tx
Python_Haegl.powerpoint presentation. txPython_Haegl.powerpoint presentation. tx
Python_Haegl.powerpoint presentation. txvishwanathgoudapatil1
 
Improve Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptxImprove Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptxCatherineVania1
 
Programming in Python
Programming in Python Programming in Python
Programming in Python Tiji Thomas
 
Python - Module 1.ppt
Python - Module 1.pptPython - Module 1.ppt
Python - Module 1.pptjaba kumar
 
Introduction to Python Part-1
Introduction to Python Part-1Introduction to Python Part-1
Introduction to Python Part-1Devashish Kumar
 
Python Interview Questions For Experienced
Python Interview Questions For ExperiencedPython Interview Questions For Experienced
Python Interview Questions For Experiencedzynofustechnology
 

Similar to Basic of Python- Hands on Session (20)

Get started python programming part 1
Get started python programming   part 1Get started python programming   part 1
Get started python programming part 1
 
Introduction to Python for Data Science and Machine Learning
Introduction to Python for Data Science and Machine Learning Introduction to Python for Data Science and Machine Learning
Introduction to Python for Data Science and Machine Learning
 
Automation Testing theory notes.pptx
Automation Testing theory notes.pptxAutomation Testing theory notes.pptx
Automation Testing theory notes.pptx
 
Pythonppt28 11-18
Pythonppt28 11-18Pythonppt28 11-18
Pythonppt28 11-18
 
FUNDAMENTALS OF PYTHON LANGUAGE
 FUNDAMENTALS OF PYTHON LANGUAGE  FUNDAMENTALS OF PYTHON LANGUAGE
FUNDAMENTALS OF PYTHON LANGUAGE
 
Python slide.1
Python slide.1Python slide.1
Python slide.1
 
Python Decision Making And Loops.pdf
Python Decision Making And Loops.pdfPython Decision Making And Loops.pdf
Python Decision Making And Loops.pdf
 
Top Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdfTop Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdf
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
 
IoT-Week1-Day1-Lab.pptx
IoT-Week1-Day1-Lab.pptxIoT-Week1-Day1-Lab.pptx
IoT-Week1-Day1-Lab.pptx
 
Python (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizePython (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualize
 
Python introduction
Python introductionPython introduction
Python introduction
 
Python_Haegl.powerpoint presentation. tx
Python_Haegl.powerpoint presentation. txPython_Haegl.powerpoint presentation. tx
Python_Haegl.powerpoint presentation. tx
 
Improve Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptxImprove Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptx
 
Python ppt_118.pptx
Python ppt_118.pptxPython ppt_118.pptx
Python ppt_118.pptx
 
Programming in Python
Programming in Python Programming in Python
Programming in Python
 
Python - Module 1.ppt
Python - Module 1.pptPython - Module 1.ppt
Python - Module 1.ppt
 
Python overview
Python   overviewPython   overview
Python overview
 
Introduction to Python Part-1
Introduction to Python Part-1Introduction to Python Part-1
Introduction to Python Part-1
 
Python Interview Questions For Experienced
Python Interview Questions For ExperiencedPython Interview Questions For Experienced
Python Interview Questions For Experienced
 

More from Dharmesh Tank

Goal Recognition in Soccer Match
Goal Recognition in Soccer MatchGoal Recognition in Soccer Match
Goal Recognition in Soccer MatchDharmesh Tank
 
Face recognization using artificial nerual network
Face recognization using artificial nerual networkFace recognization using artificial nerual network
Face recognization using artificial nerual networkDharmesh Tank
 
Graph problem & lp formulation
Graph problem & lp formulationGraph problem & lp formulation
Graph problem & lp formulationDharmesh Tank
 
FIne Grain Multithreading
FIne Grain MultithreadingFIne Grain Multithreading
FIne Grain MultithreadingDharmesh Tank
 

More from Dharmesh Tank (6)

Seminar on MATLAB
Seminar on MATLABSeminar on MATLAB
Seminar on MATLAB
 
Goal Recognition in Soccer Match
Goal Recognition in Soccer MatchGoal Recognition in Soccer Match
Goal Recognition in Soccer Match
 
Face recognization using artificial nerual network
Face recognization using artificial nerual networkFace recognization using artificial nerual network
Face recognization using artificial nerual network
 
Graph problem & lp formulation
Graph problem & lp formulationGraph problem & lp formulation
Graph problem & lp formulation
 
A Big Data Concept
A Big Data ConceptA Big Data Concept
A Big Data Concept
 
FIne Grain Multithreading
FIne Grain MultithreadingFIne Grain Multithreading
FIne Grain Multithreading
 

Recently uploaded

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(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
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
(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
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana 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
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
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
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
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
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 

Recently uploaded (20)

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
(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...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
(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...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
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 )
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
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
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
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
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 

Basic of Python- Hands on Session

  • 1. Online Presentation on Learn Python: Python for beginners Presented by Prof. DharmeshTank CE / IT Department 09-May-2020
  • 2. Outline  What and Why Python?  Installation of Python  Editors used for Python  Variable declaration, Numbers & Data types  Operators, String, List,Tuples, Dictionary  Conditional Statements  Looping Statements  Application of Python language  Conclusion
  • 3. What is Python? Python is an interpreted, object- oriented, high-level programming language with dynamic semantics. Source: https://www.python.org/
  • 4. Why Python?  It is portable, expandable, and embeddable.  It can easily managing and organizing complex data.  It’s syntax are clean.  Python is the language of choice for the Machine Learning, AI, Data Science, Raspberry Pi.  Python offers tools that streamline the IoT development process, such as webrepl.  Since Python is an interpreted language, you can easily test your solution without compiling the code or flashing the device.
  • 7. EditorsUsed for Python  Python IDLE  SublimeText  Atom  Jupiter  PyDev  Anaconda  PyCharm  Spyder  Visual Studio IDE  Vi /Vim (Used in Linux)  Thonny (Used in Linux) Source: www.datacamp.com%2Fcommunity%2Ftutorials%2Ftop-python-ides-for-2019&psig=AOvVaw0bp2ioDTCGM
  • 8. Variable declaration & Data types • What are the different data types in Python ? In Python, data types are broadly classified into the following: 1. Numbers 2. List 3.Tuple 4. Strings 5. Dictionary • How to define a variable? Syntax: VariableName = value Example: phoneNo = 12345 Marks = 85.45 • How to comments? Syntax: #variableName = value Example: >>> # a=10
  • 9. Operators 1. Assignment Operator (‘=‘) 2. Arithmetic Operators  Multiplication (‘*’)  Division (‘/‘)  Addition (‘+’)  Subtraction (‘-‘)  Modulo (‘%’) 3. Relational or Comparison Operators  Equal to (‘==‘) , Greater than (‘>’), Lesser than (‘<‘) , Greater than or equal to (‘>=’) , Lesser than or equal to (‘<=‘), Not equal to (!=) 4. Logical Operators  and -> Example: ((5 > 3) and (3 < 5)) True  or -> Example: ((5 < 3) or (3 < 5)) True  not -> Example: not (5<3) returnsTrue (reverse of False).
  • 11. String  How to define a string ? Syntax : stringName = “string”or stringName = ‘string’ Example: programmingLanguage = “Python” or programmingLanguage = ‘Python’  The starting index of any string is zero.
  • 13. String In-built function  upper() - Syntax : stringName.upper()  lower() - Syntax : stringName.lower()  replace() - Syntax: stringName.replace(“Old Str”, “New Str”)  length - Syntax: len(stringName)
  • 15. List  A list is a container that holds many objects under a single name. Syntax : listName = [object1, object2, object3] Example: fruit = [‘Apple', ‘Mango', ‘Orange’]  It is same as array in C, C++ or JAVA.  To access the list : Example : fruit[0] = Apple, fruit[1] = Mango, fruit[2] = Orange
  • 16. ListOperations  append() - To append any value in list Syntax : list.append(element)  insert() - To Insert at specific place in list Syntax : list.insert(index, element)  remove() - To remove the element from list Syntax: list.remove(element)  sort -To sort the list in ascending order Syntax: list.sort()  reverse -To reverse the list Syntax: list.reverse()  pop -To delete the specific index value Syntax: list.pop(index)
  • 18. Tuples • A tuple is a container that holds many objects under a single name. • A tuple is immutable which means, a tuple once defined cannot be modified. Syntax : tupleName = (object1, object2, object3) Example: ImpDate = (“11-09-1989”, “13-2-2020”) • To access the values in a tuple >>> ImpDate[1] >>>13-2-2020 • To delete a tuple Syntax: del(tupleName) Example: del(ImpDate)
  • 19. Dictionary • A dictionary is a set of key-value pairs referenced by a single name. Syntax : dictionaryName = {“keyOne” : “valueOne”, “keyTwo”: “valueTwo”} Example:>>> colorOfFruits = {“apple”: “red”, “mango”: “yellow”, “orange”: “orange”} • To Retrieve the value of dictionary Syntax: dictionaryName[“key”] Example: >>>colorOfFruits[“mango”] >>>yellow
  • 20. Dictionary inbuilt Functions  List all keys : keys() is used to list all the keys in a dictionary. Syntax: dictionaryName.keys()  List all values : values() is used to list all the values in a dictionary Syntax: dictionaryName.values()  Delete a key-value pair : del keyword is used to delete a key- value pair from a dictionary Syntax: del dictionaryName[“key”]  Copy a dictionary into another : is used to copy the contents of one dictionary to another Syntax: dictionaryTwo = dictionaryOne.copy()  Clear a dictionary: is used to clear the contents of a dictionary and make it empty .
  • 22.  Condition statements are a block of statements whose execution depends on a certain condition.  Indentation play a very important role over here.  Different type of condition statements: 1. If statement 2. If-else statement 3. If-elif-else statement 4. Nested if Control Statement (Condition)
  • 24. Continue…. 4. Nested if statement 3. If-elif-else statement
  • 25.  Loop statements : Looping is used to repeatedly perform a block of statements over and over again.  Different type of loop statements: 1. For loop 2. While loop Control Statement (Loop)
  • 26. 1. For loop statement • The number of iterations to be performed depends upon the length of the list • Syntax: for count in list: statement 1 statement 2… statement n • Here count is a iterative variable who’s value start from first value of the list . • And, list is the array in python. • end = ‘ ’ is used to end the print statement with a white space instead of a new line.
  • 27. 2.While loop statement • It repeatedly execute a block of statements as long as the condition mentioned holds true. Syntax: while condition: statement 1 statement 2… statement n • Here condition is used to control the statement. • while True: statement used for infinite no of iteration.
  • 28. Additional Statement  Break: A break statement is used to stop a loop from further execution.  Example: >>>len=1 >>>while len>0: if len == 3: break print(len) len=len+1  Else:The block of statements in the else block gets executed if the break statement in the looping condition was executed.  Example: >>> len=1 >>>while len<=3: if len ==5: break print(len) len=len+1 else: print(“Break statement was executed”)  Continue: Continue statement is used to skip a particular iteration of the loop.  Example: >>> len = 1 >>>while len<=4: if len ==2: len=len+1 continue print(len) len=len+1
  • 30. Real world Application of Python  BitTorrent is made up in Python  Web and Internet Development  Scientific and Numeric: SciPy, Pandas, Ipython  Business Applications : Odoo, Tryton Source: topdevelopers.co%2Fblog%2F10-reasons-to-choose-python-web-development-project%2F&psig=AOvVaw 2drpI11_4MB70 UCf_c7W0S&ust=1589011542035214

Editor's Notes

  1. = operator -> Assigns the value at the right hand side to the variable at the left hand side.
  2. Also for is used within specific range >>> for i in range(1,6): print(i) 1 2 3 4 5 >>>
  3. While break statement stops the whole loop from execution, continue stops just an iteration of that loop.