MENTORSHIP – PROF.NAIYER
HODA
Presented by :- sonam priya
Branch :- computer sc. & engineering
Roll No. :- 2024-cse-47
Data type in python
Data types in python :-
A data type represents the type of data stored
into a variable or memory .
Some of the basic data types are :-
o Numeric type
o Sequences
o Sets
o Dictionary
o boolean
Python Data Type
Numeric Data type :-
1. Integer :- Integer are whole numbers without a decimal point.
e.g :- age = 17
X = 49
2. Float :- It represents real numbers with a decimal point .
e.g:- pi = 3.14
y = 7.0
3. Complex :- It represent complex numbers
e.g :- a = 6 + 4j
b = I - 2
Boolean Data Types :-
The Boolean data type is one of the simplest data types in
programming
 It contain only two type :-
o True
o False
e.g :-
• is 7 equal to 7 = True
• Is 4 equal to 5 = False
Sequence Data Type :-
1. Strings:-Strings are sequences of Characters enclosed in single ०४
double quote
2. List:-List are ordered collections pair of items enclosed with in a of
square brackets. The items in a list can be same or of different
data types.
eg :-
student_names = ['ankit', 'ram', 'Sono“]
List are mutable ie. we can change the contents of list
after its creation.
3. Tuple:-Tuples are ordered collection similar to lists, but they
are immutable i.e. you cannot change the contents after its
creation.
e.g. - Student-scores = (85,92,46)
Dictionary :-
Dictionary :- Dictionary are collection of Key-value pairs.
The Key of a dictionary should be unique and they map to
corresponding value.
eg: - Student-info = $ 1: amit', 2: 'govind' →3:"Ram’)
Set :-
Set :- A set is a collection which is unordered and unindexed.
e.g.- fruit f'apple', 'guava', 'banana'"}
Data type in python by sonam kumari .pptx

Data type in python by sonam kumari .pptx

  • 1.
    MENTORSHIP – PROF.NAIYER HODA Presentedby :- sonam priya Branch :- computer sc. & engineering Roll No. :- 2024-cse-47 Data type in python
  • 2.
    Data types inpython :- A data type represents the type of data stored into a variable or memory . Some of the basic data types are :- o Numeric type o Sequences o Sets o Dictionary o boolean
  • 3.
  • 4.
    Numeric Data type:- 1. Integer :- Integer are whole numbers without a decimal point. e.g :- age = 17 X = 49 2. Float :- It represents real numbers with a decimal point . e.g:- pi = 3.14 y = 7.0 3. Complex :- It represent complex numbers e.g :- a = 6 + 4j b = I - 2
  • 5.
    Boolean Data Types:- The Boolean data type is one of the simplest data types in programming  It contain only two type :- o True o False e.g :- • is 7 equal to 7 = True • Is 4 equal to 5 = False
  • 6.
    Sequence Data Type:- 1. Strings:-Strings are sequences of Characters enclosed in single ०४ double quote 2. List:-List are ordered collections pair of items enclosed with in a of square brackets. The items in a list can be same or of different data types. eg :- student_names = ['ankit', 'ram', 'Sono“] List are mutable ie. we can change the contents of list after its creation.
  • 7.
    3. Tuple:-Tuples areordered collection similar to lists, but they are immutable i.e. you cannot change the contents after its creation. e.g. - Student-scores = (85,92,46)
  • 8.
    Dictionary :- Dictionary :-Dictionary are collection of Key-value pairs. The Key of a dictionary should be unique and they map to corresponding value. eg: - Student-info = $ 1: amit', 2: 'govind' →3:"Ram’) Set :- Set :- A set is a collection which is unordered and unindexed. e.g.- fruit f'apple', 'guava', 'banana'"}