SlideShare a Scribd company logo
RAMCO INSTITUTE OF TECHNOLOGY
TOPICS
Introduction to Anaconda & Navigator
General features
 Why We Should Learn Python
Python Application
Data types
Exercises on simple program execution
Active learning
12/21/2020
2
INTRODUCTION TO ANACONDA
Anaconda is an open-source distribution for
python. It is used for data science, machine
learning, deep learning, etc.
With the availability of more than 300 libraries
for data science, it becomes fairly optimal for
any programmer to work on anaconda for data
science.
Anaconda comes with a wide variety of tools to
easily collect data from various sources using
various machine learning and AI algorithms.
12/21/2020
3
ANACONDA NAVIGATOR
12/21/2020
4
Anaconda Navigator is a graphical user interface (GUI) included in allows
you to launch applications and easily manage packages, environments, and
channels without using command-line commands.
12/21/2020
5
12/21/2020
6
GENERAL FEATURES
12/21/2020
7
WHY WE SHOULD LEARN PYTHON
12/21/2020
8
12/21/2020
9
PYTHON APPLICATION
Web Development
Game Development
Machine Learning and Artificial
Intelligence
Data Science and Data Visualization
 Web Scraping Applications
12/21/2020
10
CONT…
Business Applications
CAD Applications
Embedded Applications
Well-known embedded application could
be the Raspberry Pi which uses Python
for its computing
12/21/2020
11
12/21/2020
12
Data type
• Data type refers to the type and size of data. Variables
can hold values of different data types. Python is a
purely object oriented language. It refers to everything
as an object, including numbers and strings.
• The six standard data types supported by python
includes:
12/21/2020
13
NUMBER
 Number refers to a numeric value. It includes integers,
floating point, and complex numbers
Example:
a = 5
print(a, type(a))
a = 2.0
print(a, type(a))
Output:
5 <class 'int'>
2.0 <class 'float'>
12/21/2020
14
EXAMPLE
12/21/2020
15
• List is an ordered sequence of items. All the items
in a list do not need to be of the same type.
• Lists are mutable. The elements in the list can be
modified.
• To declare a list in python, separate the items
using commas and enclose them within square
brackets [ ].
Example:
>>>a = [5,10,15,20,25,30,35,40]
>>>a[2]
15
DATA TYPE - LIST
12/21/2020
16
12/21/2020
17
LISTS ARE MUTABLE
>>>a = [5,10,15,20,25,30,35,40]
>>>a[3]=17
>>>a
>>>[5,10,15,17,25,30,35,40]
12/21/2020
18
EXAMPLE OF LIST
12/21/2020
19
TUPLE
• Tuple is an ordered sequence of items same as list.
The only difference is that tuples are immutable.
Tuples once created cannot be modified.
• It is defined within parentheses ( ) where items are
separated by commas
Example:
T=("apple","banana","cherry")
print(T)
T=("apple","banana","cherry")
print(T[1])
banana
12/21/2020
20
TUPLE ARE IMMUTABLE
>>> T=(1,"rit",5,7,10)
>>> T
(1, 'rit', 5, 7, 10)
>>> T[3]=4
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
T[3]=4
TypeError: 'tuple' object does not support item
assignment
>>>
12/21/2020
21
STRING
• A String in python can be a series or a
sequence of alphabets, numerals and
special characters.
• Single quotes or double quotes are used to
represent strings.
• >>> s = "This is a string"
• Strings are immutable.
12/21/2020
22
EXAMPLE OF STRING
>>> c="Ramco Institute of Technology"
>>> c
'Ramco Institute of Technology'
>>> print(c)
Ramco Institute of Technology
>>> c[4]
'o'
>>> c[7]
'n'
>>> c[4]="l"
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
c[4]="l"
TypeError: 'str' object does not support item assignment
12/21/2020
23
DICTIONARY
 A dictionary is a collection which is unordered, changeable and
indexed.
 In Python dictionaries are written with curly brackets, and they
have keys and values
Example:
>>> D={"Name":"Latha","Age":20}
>>> D
{'Name': 'Latha', 'Age': 20}
>>> D["Name"]
'Latha'
>>> D["Name"]="Sudha"
>>> D
{'Name': 'Sudha', 'Age': 20}
>>>
12/21/2020
24
12/21/2020
25
SET
12/21/2020
26
 Set is an unordered collection of data type that is
iterable, mutable and has no duplicate elements.
 Sets can be created by using the built-in set()
function with an iterable object or a sequence by
placing the sequence inside curly braces,
separated by ‘comma’. A set contains only
unique elements.
 The major advantage of using a set, as opposed
to a list, is that it has a highly optimized method
for checking whether a specific element is
contained in the set.
EXAMPLE SET
12/21/2020
27
12/21/2020
28
SIMPLE PROGRAM
#Addition of two number
a=19
b=23
c=a+b
print(c)
Output
42
#Getting the input from user
a=int(input("Enter the number"))
b=int(input("Enter another number"))
c=a+b
print(c)
Output
Enter the number5
Enter another number20
25
12/21/2020
29
#program to convert Celsius to Fahrenheit
celsius=int(input("Enter the celsius"))
fahrenheit =(celsius * 1.8) + 32
print(fahrenheit)
Output:
Enter the celsius45
113.0
12/21/2020
30
Calculator
a=int(input("Enter the number"))
b=int(input("Enter another the number"))
sum=a+b
differnce=a-b
product=a*b
quoitent=a/b
reminder=a%b
print("sum=",sum)
print(differnce)
print(quoitent)
print(reminder)
Output:
Enter the number10
Enter another the number5
sum= 15
5
2.0
0
12/21/2020
31
#Swapping of two number
a=5
b=7
temp=a
a=b
b=temp
print(a)
print(b)
Output:
7
5
12/21/2020
32
SIMPLE PROGRAM
#Program to find the area of circle
pi=3.14
r=float(input("Enter the Radius"))
area=pi*r*r
print(area)
Output:
Enter the Radius 5
78.5
>>>
12/21/2020
33
RECAP
12/21/2020
34
CLASS POLL
1.Which of these is not a core data type?
(A) Lists
(B) Dictionary
(C) Tuples
(D) Class
2.What is the output of the following code?
sampleSet = {"Jodi", "Eric", "Garry"}
sampleSet.add(1, "Vicki")
print(sampleSet)
A){‘Vicki’, ‘Jodi’, ‘Garry’, ‘Eric’}
B){‘Jodi’, ‘Vicki’, ‘Garry’, ‘Eric’}
C)The program executed with error
D) None of theses
12/21/2020
35
3.What is the output of the following code?
str = "pynative"
print (str[1:3])
A)py
B)yn
C)pyn
D)yna
12/21/2020
36
12/21/2020
37

More Related Content

Similar to Datatypes python programming

PPT on Data Science Using Python
PPT on Data Science Using PythonPPT on Data Science Using Python
PPT on Data Science Using Python
NishantKumar1179
 
Tableau interview questions and answers
Tableau interview questions and answersTableau interview questions and answers
Tableau interview questions and answers
kavinilavuG
 
XII - 2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdf
XII -  2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdfXII -  2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdf
XII - 2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdf
KrishnaJyotish1
 
Python - Lecture 12
Python - Lecture 12Python - Lecture 12
Python - Lecture 12
Ravi Kiran Khareedi
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
Shaista Qadir
 
R Get Started II
R Get Started IIR Get Started II
R Get Started II
Sankhya_Analytics
 
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
Serban Tanasa
 
Python-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxPython-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptx
ParveenShaik21
 
4)12th_L-1_PYTHON-PANDAS-I.pptx
4)12th_L-1_PYTHON-PANDAS-I.pptx4)12th_L-1_PYTHON-PANDAS-I.pptx
4)12th_L-1_PYTHON-PANDAS-I.pptx
AdityavardhanSingh15
 
ComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical SciencesComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical Sciences
alexstorer
 
C++ STL (quickest way to learn, even for absolute beginners).pptx
C++ STL (quickest way to learn, even for absolute beginners).pptxC++ STL (quickest way to learn, even for absolute beginners).pptx
C++ STL (quickest way to learn, even for absolute beginners).pptx
Abhishek Tirkey
 
C++ STL (quickest way to learn, even for absolute beginners).pptx
C++ STL (quickest way to learn, even for absolute beginners).pptxC++ STL (quickest way to learn, even for absolute beginners).pptx
C++ STL (quickest way to learn, even for absolute beginners).pptx
GauravPandey43518
 
Stat Design3 18 09
Stat Design3 18 09Stat Design3 18 09
Stat Design3 18 09
stat
 
January 2016 Meetup: Speeding up (big) data manipulation with data.table package
January 2016 Meetup: Speeding up (big) data manipulation with data.table packageJanuary 2016 Meetup: Speeding up (big) data manipulation with data.table package
January 2016 Meetup: Speeding up (big) data manipulation with data.table package
Zurich_R_User_Group
 
Project Management System
Project Management SystemProject Management System
Project Management System
Divyen Patel
 
R basics
R basicsR basics
R basics
Sagun Baijal
 
ASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And RepresentationASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And Representation
Randy Connolly
 
More on Pandas.pptx
More on Pandas.pptxMore on Pandas.pptx
More on Pandas.pptx
VirajPathania1
 
Disconnected Architecture and Crystal report in VB.NET
Disconnected Architecture and Crystal report in VB.NETDisconnected Architecture and Crystal report in VB.NET
Disconnected Architecture and Crystal report in VB.NET
Everywhere
 
Prog1 chap1 and chap 2
Prog1 chap1 and chap 2Prog1 chap1 and chap 2
Prog1 chap1 and chap 2
rowensCap
 

Similar to Datatypes python programming (20)

PPT on Data Science Using Python
PPT on Data Science Using PythonPPT on Data Science Using Python
PPT on Data Science Using Python
 
Tableau interview questions and answers
Tableau interview questions and answersTableau interview questions and answers
Tableau interview questions and answers
 
XII - 2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdf
XII -  2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdfXII -  2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdf
XII - 2022-23 - IP - RAIPUR (CBSE FINAL EXAM).pdf
 
Python - Lecture 12
Python - Lecture 12Python - Lecture 12
Python - Lecture 12
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
R Get Started II
R Get Started IIR Get Started II
R Get Started II
 
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
 
Python-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptxPython-for-Data-Analysis.pptx
Python-for-Data-Analysis.pptx
 
4)12th_L-1_PYTHON-PANDAS-I.pptx
4)12th_L-1_PYTHON-PANDAS-I.pptx4)12th_L-1_PYTHON-PANDAS-I.pptx
4)12th_L-1_PYTHON-PANDAS-I.pptx
 
ComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical SciencesComputeFest 2012: Intro To R for Physical Sciences
ComputeFest 2012: Intro To R for Physical Sciences
 
C++ STL (quickest way to learn, even for absolute beginners).pptx
C++ STL (quickest way to learn, even for absolute beginners).pptxC++ STL (quickest way to learn, even for absolute beginners).pptx
C++ STL (quickest way to learn, even for absolute beginners).pptx
 
C++ STL (quickest way to learn, even for absolute beginners).pptx
C++ STL (quickest way to learn, even for absolute beginners).pptxC++ STL (quickest way to learn, even for absolute beginners).pptx
C++ STL (quickest way to learn, even for absolute beginners).pptx
 
Stat Design3 18 09
Stat Design3 18 09Stat Design3 18 09
Stat Design3 18 09
 
January 2016 Meetup: Speeding up (big) data manipulation with data.table package
January 2016 Meetup: Speeding up (big) data manipulation with data.table packageJanuary 2016 Meetup: Speeding up (big) data manipulation with data.table package
January 2016 Meetup: Speeding up (big) data manipulation with data.table package
 
Project Management System
Project Management SystemProject Management System
Project Management System
 
R basics
R basicsR basics
R basics
 
ASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And RepresentationASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And Representation
 
More on Pandas.pptx
More on Pandas.pptxMore on Pandas.pptx
More on Pandas.pptx
 
Disconnected Architecture and Crystal report in VB.NET
Disconnected Architecture and Crystal report in VB.NETDisconnected Architecture and Crystal report in VB.NET
Disconnected Architecture and Crystal report in VB.NET
 
Prog1 chap1 and chap 2
Prog1 chap1 and chap 2Prog1 chap1 and chap 2
Prog1 chap1 and chap 2
 

More from swarna sudha

Positioning, pointing and drawing in Human computer Interaction
Positioning, pointing and drawing in Human computer Interaction Positioning, pointing and drawing in Human computer Interaction
Positioning, pointing and drawing in Human computer Interaction
swarna sudha
 
Introduction to data link layer
Introduction to data link layerIntroduction to data link layer
Introduction to data link layer
swarna sudha
 
Range, quartiles, and interquartile range
Range, quartiles, and interquartile rangeRange, quartiles, and interquartile range
Range, quartiles, and interquartile range
swarna sudha
 
Foundations of hci the computer
Foundations of hci   the computerFoundations of hci   the computer
Foundations of hci the computer
swarna sudha
 
Innovative teaching think pair share function
Innovative teaching think pair share  functionInnovative teaching think pair share  function
Innovative teaching think pair share function
swarna sudha
 
Icmp
IcmpIcmp

More from swarna sudha (6)

Positioning, pointing and drawing in Human computer Interaction
Positioning, pointing and drawing in Human computer Interaction Positioning, pointing and drawing in Human computer Interaction
Positioning, pointing and drawing in Human computer Interaction
 
Introduction to data link layer
Introduction to data link layerIntroduction to data link layer
Introduction to data link layer
 
Range, quartiles, and interquartile range
Range, quartiles, and interquartile rangeRange, quartiles, and interquartile range
Range, quartiles, and interquartile range
 
Foundations of hci the computer
Foundations of hci   the computerFoundations of hci   the computer
Foundations of hci the computer
 
Innovative teaching think pair share function
Innovative teaching think pair share  functionInnovative teaching think pair share  function
Innovative teaching think pair share function
 
Icmp
IcmpIcmp
Icmp
 

Recently uploaded

UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 

Recently uploaded (20)

UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 

Datatypes python programming

  • 1. RAMCO INSTITUTE OF TECHNOLOGY
  • 2. TOPICS Introduction to Anaconda & Navigator General features  Why We Should Learn Python Python Application Data types Exercises on simple program execution Active learning 12/21/2020 2
  • 3. INTRODUCTION TO ANACONDA Anaconda is an open-source distribution for python. It is used for data science, machine learning, deep learning, etc. With the availability of more than 300 libraries for data science, it becomes fairly optimal for any programmer to work on anaconda for data science. Anaconda comes with a wide variety of tools to easily collect data from various sources using various machine learning and AI algorithms. 12/21/2020 3
  • 4. ANACONDA NAVIGATOR 12/21/2020 4 Anaconda Navigator is a graphical user interface (GUI) included in allows you to launch applications and easily manage packages, environments, and channels without using command-line commands.
  • 8. WHY WE SHOULD LEARN PYTHON 12/21/2020 8
  • 10. PYTHON APPLICATION Web Development Game Development Machine Learning and Artificial Intelligence Data Science and Data Visualization  Web Scraping Applications 12/21/2020 10
  • 11. CONT… Business Applications CAD Applications Embedded Applications Well-known embedded application could be the Raspberry Pi which uses Python for its computing 12/21/2020 11
  • 13. Data type • Data type refers to the type and size of data. Variables can hold values of different data types. Python is a purely object oriented language. It refers to everything as an object, including numbers and strings. • The six standard data types supported by python includes: 12/21/2020 13
  • 14. NUMBER  Number refers to a numeric value. It includes integers, floating point, and complex numbers Example: a = 5 print(a, type(a)) a = 2.0 print(a, type(a)) Output: 5 <class 'int'> 2.0 <class 'float'> 12/21/2020 14
  • 16. • List is an ordered sequence of items. All the items in a list do not need to be of the same type. • Lists are mutable. The elements in the list can be modified. • To declare a list in python, separate the items using commas and enclose them within square brackets [ ]. Example: >>>a = [5,10,15,20,25,30,35,40] >>>a[2] 15 DATA TYPE - LIST 12/21/2020 16
  • 18. LISTS ARE MUTABLE >>>a = [5,10,15,20,25,30,35,40] >>>a[3]=17 >>>a >>>[5,10,15,17,25,30,35,40] 12/21/2020 18
  • 20. TUPLE • Tuple is an ordered sequence of items same as list. The only difference is that tuples are immutable. Tuples once created cannot be modified. • It is defined within parentheses ( ) where items are separated by commas Example: T=("apple","banana","cherry") print(T) T=("apple","banana","cherry") print(T[1]) banana 12/21/2020 20
  • 21. TUPLE ARE IMMUTABLE >>> T=(1,"rit",5,7,10) >>> T (1, 'rit', 5, 7, 10) >>> T[3]=4 Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> T[3]=4 TypeError: 'tuple' object does not support item assignment >>> 12/21/2020 21
  • 22. STRING • A String in python can be a series or a sequence of alphabets, numerals and special characters. • Single quotes or double quotes are used to represent strings. • >>> s = "This is a string" • Strings are immutable. 12/21/2020 22
  • 23. EXAMPLE OF STRING >>> c="Ramco Institute of Technology" >>> c 'Ramco Institute of Technology' >>> print(c) Ramco Institute of Technology >>> c[4] 'o' >>> c[7] 'n' >>> c[4]="l" Traceback (most recent call last): File "<pyshell#5>", line 1, in <module> c[4]="l" TypeError: 'str' object does not support item assignment 12/21/2020 23
  • 24. DICTIONARY  A dictionary is a collection which is unordered, changeable and indexed.  In Python dictionaries are written with curly brackets, and they have keys and values Example: >>> D={"Name":"Latha","Age":20} >>> D {'Name': 'Latha', 'Age': 20} >>> D["Name"] 'Latha' >>> D["Name"]="Sudha" >>> D {'Name': 'Sudha', 'Age': 20} >>> 12/21/2020 24
  • 26. SET 12/21/2020 26  Set is an unordered collection of data type that is iterable, mutable and has no duplicate elements.  Sets can be created by using the built-in set() function with an iterable object or a sequence by placing the sequence inside curly braces, separated by ‘comma’. A set contains only unique elements.  The major advantage of using a set, as opposed to a list, is that it has a highly optimized method for checking whether a specific element is contained in the set.
  • 29. SIMPLE PROGRAM #Addition of two number a=19 b=23 c=a+b print(c) Output 42 #Getting the input from user a=int(input("Enter the number")) b=int(input("Enter another number")) c=a+b print(c) Output Enter the number5 Enter another number20 25 12/21/2020 29
  • 30. #program to convert Celsius to Fahrenheit celsius=int(input("Enter the celsius")) fahrenheit =(celsius * 1.8) + 32 print(fahrenheit) Output: Enter the celsius45 113.0 12/21/2020 30
  • 31. Calculator a=int(input("Enter the number")) b=int(input("Enter another the number")) sum=a+b differnce=a-b product=a*b quoitent=a/b reminder=a%b print("sum=",sum) print(differnce) print(quoitent) print(reminder) Output: Enter the number10 Enter another the number5 sum= 15 5 2.0 0 12/21/2020 31
  • 32. #Swapping of two number a=5 b=7 temp=a a=b b=temp print(a) print(b) Output: 7 5 12/21/2020 32
  • 33. SIMPLE PROGRAM #Program to find the area of circle pi=3.14 r=float(input("Enter the Radius")) area=pi*r*r print(area) Output: Enter the Radius 5 78.5 >>> 12/21/2020 33
  • 35. CLASS POLL 1.Which of these is not a core data type? (A) Lists (B) Dictionary (C) Tuples (D) Class 2.What is the output of the following code? sampleSet = {"Jodi", "Eric", "Garry"} sampleSet.add(1, "Vicki") print(sampleSet) A){‘Vicki’, ‘Jodi’, ‘Garry’, ‘Eric’} B){‘Jodi’, ‘Vicki’, ‘Garry’, ‘Eric’} C)The program executed with error D) None of theses 12/21/2020 35
  • 36. 3.What is the output of the following code? str = "pynative" print (str[1:3]) A)py B)yn C)pyn D)yna 12/21/2020 36