SlideShare a Scribd company logo
GVK CHINMAYA VIDYALAYA
SENIOR SECONDARY SCHOOL
Kothuru, Indukurupet, SPS Nellore
Data Handling
Class: 11 Subject: Python Teacher: C Vijaya
In programming, data type is an important concept.
Variables can store data of different types, and different types can do different things.
Python has the following data types built-in by default, in these categories:
Python Data Types
Text Type: str
Numeric Types: int, float, complex
Sequence Types: list, tuple, range
Mapping Type: dict
Set Types: set, frozenset
Boolean Type: bool
Binary Types: bytes, bytearray, memoryview
In Python, the data type is set when you assign a value to a variable:
Python Numbers
There are three numeric types in Python:
● int
● float
● complex
Variables of numeric types are created when you assign a value to them:
Output
String Literals
String literals in python are surrounded by either single quotation marks, or double quotation
marks.
'hello' is the same as "hello".
You can display a string literal with the print() function:
Eg:
a=”hello”
print(a)
Eg:
a=”””Welcome to gvkcv
At Indhukeurpet”””
print(a)
Strings are Arrays
Like many other popular programming languages, strings in Python are arrays of bytes
representing unicode characters.
However, Python does not have a character data type, a single character is simply a string with
a length of 1.
Square brackets can be used to access elements of the string.
Slicing
You can return a range of characters by using the slice syntax.
Specify the start index and the end index, separated by a colon, to return a part of the
string.
String Length
To get the length of a string, use the len() function.
Boolean Values
In programming you often need to know if an expression is True or False.
You can evaluate any expression in Python, and get one of two answers, True or
False.
When you compare two values, the expression is evaluated and Python returns the
Boolean answer:
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.
Python Dictionaries
Output
Core Data Types
Every variable in python holds an instance of an object. There are two types of objects in python i.e.
Mutable and Immutable objects. Whenever an object is instantiated, it is assigned a unique object
id. The type of the object is defined at the runtime and it can’t be changed afterwards. However, it’s
state can be changed if it is a mutable object.
To summarise the difference, mutable objects can change their state or contents and immutable
objects can’t change their state or content.
● Immutable Objects : These are of in-built types like int, float, bool, string, unicode, tuple.
In simple words, an immutable object can’t be changed after it is created.
Mutable vs Immutable Objects in Python
Mutable Objects : These are of type list, dict, set . Custom classes are
generally mutable.
Every Python object has three key attributes associated to it
1. The type of an object
2. The value of an object
3. The id of an object
1. The type of an object
The type of an object determines the operations that can be performed on the object.
Built-in function type() returns the type of an object.
2. The value of an object
The value is the literal itself and for a variable the data iis the data-item(the variable) it is
currently referencing. Print statement can display the value of an object.
3 .The id of an object
Id of an object is the memory location of the object.
Truth Value Testing
Value with truth value as false Values with truth value as truth
None
All the other values are
considered true
False (Boolean value False)
Zero for any numeric type,for example 0,0.0,0j
Any empty sequence eg:( ),[ ],
Any empty mapping eg: { }
www.gvkcv.in
The or operator combines two expressions,which make it operands.The or operator works in these
ways:
● Relational expressions as operands
● Numbers or strings or lists as operands
The or operator
Relational expressions as operands:
The or operator evaluates to true if either of its (relational) operands evaluates to True;False if both
operands evaluate to False.
Eg:
(4==4) or (5==8) results into True because first expression is True
5>8 or 5<2 results into False because both expressions are False
Numbers / Strings / list as operands:
In an expression x or y , if first operand has False then return second operand y as result.
Eg:
0 or 0 0 First expression is false so second expression is returned
0 or 8 8 First expression is false so second expression is returned
8 or 0 8 First expression is true hence first expression is returned
“Gvkcv” or “ ” “Gvkcv” First expression is true hence first expression is returned
“ “ or “gvkcv” “gvkcv” First expression is false hence second expression is returned
“ “ or “ “ “ “ First expression is false hence second expression is returned
“Python” or “gvkcv” “Python” First expression is true hence first expression is returned
The and operator:
● Relational expressions as operands
● Numbers or strings or lists as operands
Relational expressions as operands:
The and operator evaluates to True if both of its operands evaluate to True ; False if either or both
operands evaluate to False.
Eg:
(7==7) and (5==7) results False
(2>5) and (5<2) results False
5>2 and 2<5 results True
Numbers or Strings or Lists as operands:
In an expression x and y , if first operand has false then return first operand otherwise return second
operand.
Eg:
0 and 0 0 First expression is false so second expression is returned
0 and 8 0 First expression is false so second expression is returned
8 and 0 0 First expression is true hence first expression is returned
“Gvkcv” and “ ” “” First expression is true hence first expression is returned
“ “ and “gvkcv” “” First expression is false hence second expression is returned
“ “ and “ “ “ “ First expression is false hence second expression is returned
“Python” and “gvkcv” “gvkcv” First expression is true hence first expression is returned
The not operator:
The logical not operator negates or reverse the truth value of the expression.
Eg:
not 5 results into true
not 0 results into true
not -4 results into false
Data handling CBSE PYTHON CLASS 11
Data handling CBSE PYTHON CLASS 11

More Related Content

What's hot

data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
sabah N
 
Functions in python slide share
Functions in python slide shareFunctions in python slide share
Functions in python slide share
Devashish Kumar
 
Chapter 16 Dictionaries
Chapter 16 DictionariesChapter 16 Dictionaries
Chapter 16 Dictionaries
Praveen M Jigajinni
 
Object oriented approach in python programming
Object oriented approach in python programmingObject oriented approach in python programming
Object oriented approach in python programming
Srinivas Narasegouda
 
Pointer in c
Pointer in cPointer in c
Pointer in c
lavanya marichamy
 
Chapter 15 Lists
Chapter 15 ListsChapter 15 Lists
Chapter 15 Lists
Praveen M Jigajinni
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
Spotle.ai
 
Operators in python
Operators in pythonOperators in python
Operators in python
Prabhakaran V M
 
Python dictionary
Python   dictionaryPython   dictionary
Python dictionary
Mohammed Sikander
 
Conditional and control statement
Conditional and control statementConditional and control statement
Conditional and control statement
narmadhakin
 
Chapter 08 data file handling
Chapter 08 data file handlingChapter 08 data file handling
Chapter 08 data file handling
Praveen M Jigajinni
 
File handling in Python
File handling in PythonFile handling in Python
File handling in Python
Megha V
 
11 Unit 1 Chapter 02 Python Fundamentals
11  Unit 1 Chapter 02 Python Fundamentals11  Unit 1 Chapter 02 Python Fundamentals
11 Unit 1 Chapter 02 Python Fundamentals
Praveen M Jigajinni
 
String in python use of split method
String in python use of split methodString in python use of split method
String in python use of split method
vikram mahendra
 
Er model ppt
Er model pptEr model ppt
Er model ppt
Pihu Goel
 
Database language
Database languageDatabase language
Python exception handling
Python   exception handlingPython   exception handling
Python exception handling
Mohammed Sikander
 
Python If Else | If Else Statement In Python | Edureka
Python If Else | If Else Statement In Python | EdurekaPython If Else | If Else Statement In Python | Edureka
Python If Else | If Else Statement In Python | Edureka
Edureka!
 
Python Functions
Python   FunctionsPython   Functions
Python Functions
Mohammed Sikander
 

What's hot (20)

data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
 
Functions in python slide share
Functions in python slide shareFunctions in python slide share
Functions in python slide share
 
Dictionaries in Python
Dictionaries in PythonDictionaries in Python
Dictionaries in Python
 
Chapter 16 Dictionaries
Chapter 16 DictionariesChapter 16 Dictionaries
Chapter 16 Dictionaries
 
Object oriented approach in python programming
Object oriented approach in python programmingObject oriented approach in python programming
Object oriented approach in python programming
 
Pointer in c
Pointer in cPointer in c
Pointer in c
 
Chapter 15 Lists
Chapter 15 ListsChapter 15 Lists
Chapter 15 Lists
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
 
Operators in python
Operators in pythonOperators in python
Operators in python
 
Python dictionary
Python   dictionaryPython   dictionary
Python dictionary
 
Conditional and control statement
Conditional and control statementConditional and control statement
Conditional and control statement
 
Chapter 08 data file handling
Chapter 08 data file handlingChapter 08 data file handling
Chapter 08 data file handling
 
File handling in Python
File handling in PythonFile handling in Python
File handling in Python
 
11 Unit 1 Chapter 02 Python Fundamentals
11  Unit 1 Chapter 02 Python Fundamentals11  Unit 1 Chapter 02 Python Fundamentals
11 Unit 1 Chapter 02 Python Fundamentals
 
String in python use of split method
String in python use of split methodString in python use of split method
String in python use of split method
 
Er model ppt
Er model pptEr model ppt
Er model ppt
 
Database language
Database languageDatabase language
Database language
 
Python exception handling
Python   exception handlingPython   exception handling
Python exception handling
 
Python If Else | If Else Statement In Python | Edureka
Python If Else | If Else Statement In Python | EdurekaPython If Else | If Else Statement In Python | Edureka
Python If Else | If Else Statement In Python | Edureka
 
Python Functions
Python   FunctionsPython   Functions
Python Functions
 

Similar to Data handling CBSE PYTHON CLASS 11

data handling revision.pptx
data handling revision.pptxdata handling revision.pptx
data handling revision.pptx
DeepaRavi21
 
L6 - Loops.pptx
L6 - Loops.pptxL6 - Loops.pptx
L6 - Loops.pptx
EloAOgardo
 
L6 - Loops.pptx
L6 - Loops.pptxL6 - Loops.pptx
L6 - Loops.pptx
EloAOgardo
 
L5 - Data Types, Keywords.pptx
L5 - Data Types, Keywords.pptxL5 - Data Types, Keywords.pptx
L5 - Data Types, Keywords.pptx
EloAOgardo
 
Python.pptx
Python.pptxPython.pptx
Python.pptx
Ankita Shirke
 
Python - Module 1.ppt
Python - Module 1.pptPython - Module 1.ppt
Python - Module 1.ppt
jaba kumar
 
Introduction to Python - Part Two
Introduction to Python - Part TwoIntroduction to Python - Part Two
Introduction to Python - Part Two
amiable_indian
 
Data Types In Python.pptx
Data Types In Python.pptxData Types In Python.pptx
Data Types In Python.pptx
YatharthChaudhary5
 
UNIT II_python Programming_aditya College
UNIT II_python Programming_aditya CollegeUNIT II_python Programming_aditya College
UNIT II_python Programming_aditya College
Ramanamurthy Banda
 
chapter-3-engdata-handling1_1585929972520 by EasePDF.pptx
chapter-3-engdata-handling1_1585929972520 by EasePDF.pptxchapter-3-engdata-handling1_1585929972520 by EasePDF.pptx
chapter-3-engdata-handling1_1585929972520 by EasePDF.pptx
Jahnavi113937
 
Python_Unit_1.pdf
Python_Unit_1.pdfPython_Unit_1.pdf
Python_Unit_1.pdf
alaparthi
 
COMPUTER SCIENCE SUPPORT MATERIAL CLASS 12.pdf
COMPUTER SCIENCE SUPPORT MATERIAL CLASS 12.pdfCOMPUTER SCIENCE SUPPORT MATERIAL CLASS 12.pdf
COMPUTER SCIENCE SUPPORT MATERIAL CLASS 12.pdf
rajkumar2792005
 
Python Keywords
Python KeywordsPython Keywords
Python Keywords
khanmusfera32
 
Literals, primitive datatypes, variables, expressions, identifiers
Literals, primitive datatypes, variables, expressions, identifiersLiterals, primitive datatypes, variables, expressions, identifiers
Literals, primitive datatypes, variables, expressions, identifiers
Tanishq Soni
 
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
 
python
pythonpython
python
ultragamer6
 
Python basics
Python basicsPython basics
Python basics
Manisha Gholve
 
Input processing and output in Python
Input processing and output in PythonInput processing and output in Python
Input processing and output in Python
Raajendra M
 
Input processing and output in Python
Input processing and output in PythonInput processing and output in Python
Input processing and output in Python
MSB Academy
 

Similar to Data handling CBSE PYTHON CLASS 11 (20)

data handling revision.pptx
data handling revision.pptxdata handling revision.pptx
data handling revision.pptx
 
L6 - Loops.pptx
L6 - Loops.pptxL6 - Loops.pptx
L6 - Loops.pptx
 
L6 - Loops.pptx
L6 - Loops.pptxL6 - Loops.pptx
L6 - Loops.pptx
 
L5 - Data Types, Keywords.pptx
L5 - Data Types, Keywords.pptxL5 - Data Types, Keywords.pptx
L5 - Data Types, Keywords.pptx
 
Python.pptx
Python.pptxPython.pptx
Python.pptx
 
Python - Module 1.ppt
Python - Module 1.pptPython - Module 1.ppt
Python - Module 1.ppt
 
Introduction to Python - Part Two
Introduction to Python - Part TwoIntroduction to Python - Part Two
Introduction to Python - Part Two
 
Data Types In Python.pptx
Data Types In Python.pptxData Types In Python.pptx
Data Types In Python.pptx
 
UNIT II_python Programming_aditya College
UNIT II_python Programming_aditya CollegeUNIT II_python Programming_aditya College
UNIT II_python Programming_aditya College
 
chapter-3-engdata-handling1_1585929972520 by EasePDF.pptx
chapter-3-engdata-handling1_1585929972520 by EasePDF.pptxchapter-3-engdata-handling1_1585929972520 by EasePDF.pptx
chapter-3-engdata-handling1_1585929972520 by EasePDF.pptx
 
Python_Unit_1.pdf
Python_Unit_1.pdfPython_Unit_1.pdf
Python_Unit_1.pdf
 
COMPUTER SCIENCE SUPPORT MATERIAL CLASS 12.pdf
COMPUTER SCIENCE SUPPORT MATERIAL CLASS 12.pdfCOMPUTER SCIENCE SUPPORT MATERIAL CLASS 12.pdf
COMPUTER SCIENCE SUPPORT MATERIAL CLASS 12.pdf
 
Python Keywords
Python KeywordsPython Keywords
Python Keywords
 
Literals, primitive datatypes, variables, expressions, identifiers
Literals, primitive datatypes, variables, expressions, identifiersLiterals, primitive datatypes, variables, expressions, identifiers
Literals, primitive datatypes, variables, expressions, identifiers
 
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
 
python
pythonpython
python
 
Python basics
Python basicsPython basics
Python basics
 
Python slide.1
Python slide.1Python slide.1
Python slide.1
 
Input processing and output in Python
Input processing and output in PythonInput processing and output in Python
Input processing and output in Python
 
Input processing and output in Python
Input processing and output in PythonInput processing and output in Python
Input processing and output in Python
 

More from chinthala Vijaya Kumar

GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
chinthala Vijaya Kumar
 
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
chinthala Vijaya Kumar
 
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
chinthala Vijaya Kumar
 
Inserting an element in a sorted array using traditional algorithm
Inserting an element in a sorted array using traditional algorithmInserting an element in a sorted array using traditional algorithm
Inserting an element in a sorted array using traditional algorithm
chinthala Vijaya Kumar
 
Binary search in Python using recursion
Binary search in Python using recursionBinary search in Python using recursion
Binary search in Python using recursion
chinthala Vijaya Kumar
 
Linear search python CBSE Class 12
Linear search python CBSE Class 12Linear search python CBSE Class 12
Linear search python CBSE Class 12
chinthala Vijaya Kumar
 
Data visualization pyplot
Data visualization pyplotData visualization pyplot
Data visualization pyplot
chinthala Vijaya Kumar
 
Bubble sort
Bubble sortBubble sort
Python Fundamentals Class 11
Python Fundamentals Class 11Python Fundamentals Class 11
Python Fundamentals Class 11
chinthala Vijaya Kumar
 
File handling CBSE CLASS 12
File handling CBSE CLASS 12File handling CBSE CLASS 12
File handling CBSE CLASS 12
chinthala Vijaya Kumar
 
Recursion CBSE Class 12
Recursion CBSE Class 12Recursion CBSE Class 12
Recursion CBSE Class 12
chinthala Vijaya Kumar
 

More from chinthala Vijaya Kumar (11)

GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
 
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
 
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
 
Inserting an element in a sorted array using traditional algorithm
Inserting an element in a sorted array using traditional algorithmInserting an element in a sorted array using traditional algorithm
Inserting an element in a sorted array using traditional algorithm
 
Binary search in Python using recursion
Binary search in Python using recursionBinary search in Python using recursion
Binary search in Python using recursion
 
Linear search python CBSE Class 12
Linear search python CBSE Class 12Linear search python CBSE Class 12
Linear search python CBSE Class 12
 
Data visualization pyplot
Data visualization pyplotData visualization pyplot
Data visualization pyplot
 
Bubble sort
Bubble sortBubble sort
Bubble sort
 
Python Fundamentals Class 11
Python Fundamentals Class 11Python Fundamentals Class 11
Python Fundamentals Class 11
 
File handling CBSE CLASS 12
File handling CBSE CLASS 12File handling CBSE CLASS 12
File handling CBSE CLASS 12
 
Recursion CBSE Class 12
Recursion CBSE Class 12Recursion CBSE Class 12
Recursion CBSE Class 12
 

Recently uploaded

Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 

Recently uploaded (20)

Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 

Data handling CBSE PYTHON CLASS 11

  • 1. GVK CHINMAYA VIDYALAYA SENIOR SECONDARY SCHOOL Kothuru, Indukurupet, SPS Nellore Data Handling Class: 11 Subject: Python Teacher: C Vijaya
  • 2. In programming, data type is an important concept. Variables can store data of different types, and different types can do different things. Python has the following data types built-in by default, in these categories: Python Data Types Text Type: str Numeric Types: int, float, complex Sequence Types: list, tuple, range Mapping Type: dict Set Types: set, frozenset Boolean Type: bool Binary Types: bytes, bytearray, memoryview
  • 3. In Python, the data type is set when you assign a value to a variable:
  • 4. Python Numbers There are three numeric types in Python: ● int ● float ● complex Variables of numeric types are created when you assign a value to them:
  • 6. String Literals String literals in python are surrounded by either single quotation marks, or double quotation marks. 'hello' is the same as "hello". You can display a string literal with the print() function: Eg: a=”hello” print(a) Eg: a=”””Welcome to gvkcv At Indhukeurpet””” print(a)
  • 7. Strings are Arrays Like many other popular programming languages, strings in Python are arrays of bytes representing unicode characters. However, Python does not have a character data type, a single character is simply a string with a length of 1. Square brackets can be used to access elements of the string.
  • 8.
  • 9. Slicing You can return a range of characters by using the slice syntax. Specify the start index and the end index, separated by a colon, to return a part of the string.
  • 10.
  • 11. String Length To get the length of a string, use the len() function.
  • 12. Boolean Values In programming you often need to know if an expression is True or False. You can evaluate any expression in Python, and get one of two answers, True or False. When you compare two values, the expression is evaluated and Python returns the Boolean answer:
  • 13.
  • 14.
  • 15. 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. Python Dictionaries
  • 18. Every variable in python holds an instance of an object. There are two types of objects in python i.e. Mutable and Immutable objects. Whenever an object is instantiated, it is assigned a unique object id. The type of the object is defined at the runtime and it can’t be changed afterwards. However, it’s state can be changed if it is a mutable object. To summarise the difference, mutable objects can change their state or contents and immutable objects can’t change their state or content. ● Immutable Objects : These are of in-built types like int, float, bool, string, unicode, tuple. In simple words, an immutable object can’t be changed after it is created. Mutable vs Immutable Objects in Python
  • 19.
  • 20.
  • 21. Mutable Objects : These are of type list, dict, set . Custom classes are generally mutable.
  • 22. Every Python object has three key attributes associated to it 1. The type of an object 2. The value of an object 3. The id of an object
  • 23. 1. The type of an object The type of an object determines the operations that can be performed on the object. Built-in function type() returns the type of an object.
  • 24. 2. The value of an object The value is the literal itself and for a variable the data iis the data-item(the variable) it is currently referencing. Print statement can display the value of an object.
  • 25. 3 .The id of an object Id of an object is the memory location of the object.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31. Truth Value Testing Value with truth value as false Values with truth value as truth None All the other values are considered true False (Boolean value False) Zero for any numeric type,for example 0,0.0,0j Any empty sequence eg:( ),[ ], Any empty mapping eg: { } www.gvkcv.in
  • 32. The or operator combines two expressions,which make it operands.The or operator works in these ways: ● Relational expressions as operands ● Numbers or strings or lists as operands The or operator
  • 33. Relational expressions as operands: The or operator evaluates to true if either of its (relational) operands evaluates to True;False if both operands evaluate to False. Eg: (4==4) or (5==8) results into True because first expression is True 5>8 or 5<2 results into False because both expressions are False
  • 34. Numbers / Strings / list as operands: In an expression x or y , if first operand has False then return second operand y as result. Eg: 0 or 0 0 First expression is false so second expression is returned 0 or 8 8 First expression is false so second expression is returned 8 or 0 8 First expression is true hence first expression is returned “Gvkcv” or “ ” “Gvkcv” First expression is true hence first expression is returned “ “ or “gvkcv” “gvkcv” First expression is false hence second expression is returned “ “ or “ “ “ “ First expression is false hence second expression is returned “Python” or “gvkcv” “Python” First expression is true hence first expression is returned
  • 35. The and operator: ● Relational expressions as operands ● Numbers or strings or lists as operands
  • 36. Relational expressions as operands: The and operator evaluates to True if both of its operands evaluate to True ; False if either or both operands evaluate to False. Eg: (7==7) and (5==7) results False (2>5) and (5<2) results False 5>2 and 2<5 results True
  • 37. Numbers or Strings or Lists as operands: In an expression x and y , if first operand has false then return first operand otherwise return second operand. Eg: 0 and 0 0 First expression is false so second expression is returned 0 and 8 0 First expression is false so second expression is returned 8 and 0 0 First expression is true hence first expression is returned “Gvkcv” and “ ” “” First expression is true hence first expression is returned “ “ and “gvkcv” “” First expression is false hence second expression is returned “ “ and “ “ “ “ First expression is false hence second expression is returned “Python” and “gvkcv” “gvkcv” First expression is true hence first expression is returned
  • 38. The not operator: The logical not operator negates or reverse the truth value of the expression. Eg: not 5 results into true not 0 results into true not -4 results into false