0% found this document useful (0 votes)
3 views1 page

Python Data Types Overview for Class 11

The document outlines the basic data types in Python as introduced in Class 11 Computer Science, categorized into Numeric, Sequence, Mapping, Set, Boolean, and Special types. Examples are provided for each type, such as int for integers, str for strings, and dict for key-value pairs. A summary table is included for quick reference of the data types.

Uploaded by

ramuseemusuru503
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Python Data Types Overview for Class 11

The document outlines the basic data types in Python as introduced in Class 11 Computer Science, categorized into Numeric, Sequence, Mapping, Set, Boolean, and Special types. Examples are provided for each type, such as int for integers, str for strings, and dict for key-value pairs. A summary table is included for quick reference of the data types.

Uploaded by

ramuseemusuru503
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Python Data Types - Class 11 Notes

In Python, data types define the type of values a variable can store. Class 11 Computer Science
introduces the following basic data types.

1. Numeric Types
int → Integer numbers (e.g., x = 10)
float → Decimal numbers (e.g., y = 3.14)
complex → Numbers with real and imaginary part (e.g., z = 2 + 3j)

2. Sequence Types
str → String of characters (e.g., name = 'Ganesh')
list → Ordered, mutable collection (e.g., fruits = ['apple', 'banana', 'mango'])
tuple → Ordered, immutable collection (e.g., coordinates = (10, 20, 30))

3. Mapping Type
dict → Key–value pairs (e.g., student = {'name':'Ganesh','age':16,'class':'11th'})

4. Set Types
set → Unordered collection of unique items (e.g., colors = {'red','green','blue'})
frozenset → Immutable set (e.g., vowels = frozenset({'a','e','i','o','u'}))

5. Boolean Type
bool → True or False (e.g., is_student = True)

6. Special Type
NoneType → Represents nothing/empty (e.g., x = None)

Summary Table
Category Data Types
Numeric int, float, complex
Sequence str, list, tuple
Mapping dict
Set set, frozenset
Boolean bool
Special NoneType

You might also like