12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications மின்னணு தரவு பரிமாற்றம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிக பாதுகாப்பு அமைப்புகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின்னணு செலுத்தல் முறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications திறந்த மூல கருத்துருக்கள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு வடமிடல் Sample Question Papers Study Material - QB365 Set A

Published on: 03/12/2019
Lists, Tuples, Sets and Dictionary
Download Tamil Nadu 12th Standard Computer Science question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Science Test

1.
a = ['A', 2, 3, [4,5,6]] is an example of
Tuple
Set
List
Dictionary
2.
In list, the negative index number begin with
0
1
-1
0.1
3.
Which of the following set operation includes all the elements that are in two sets but not the one that are common to two sets?
Symmetric difference
Difference
Intersection
Union
4.
What is the use of type() function in python?
To create a Tuple
To know the type of an element in tuple.
To know the data type of python object
To create a list.
5.
Which of the following function is used to count the number of elements in a list?
count()
find()
len()
index()
6.
State the working of pop () and clear () function.
7.
Write a syntax that shows the lists are mutable.
8.
What is nested list? Give example.
9.
What is set in Python?
10.
Write the syntax of creating a Tuple with n number of elements.
11.
Write a note on the following function used in list.
12.
How will delete an entire tuple? Give an example.
13.
How will you find the length of a list? Explain with an example.
14.
What are the difference between List and Dictionary?
15.
List out the set operations supported by python.
16.
Explain remove (), pop () and clear () used in list with an example.
17.
What is nested tuple? Explain with an example.
1.
(c)
List
2.
(c)
-1
3.
(a)
Symmetric difference
4.
(c)
To know the data type of python object
5.
(c)
len()
6.
(i) pop() function: pope () function can also be used to delete an element using the given index value. pop () function deletes and returns the last element of a list if the index is not given
(ii) clear ( ) function: The function clear( ) is used to delete all the elements in list, it deletes only the elements and retains the list.
7.
Syntax:
Lise Variable [index of an element] = Value to be changed
Lise Variable [index from: index to] = Values to be changed
8.
(i) Mylist contains another list as an element. This type of list is known as "Nested List': Nested list is a list containing another list as an element.
(ii) Example: Mylist = [ "Welcome", 3.14, 10, [2,4,6] ]
9.
(i) In Python, a set is another type of collection data type. A'Set is a mutable and an unordered collection of elements without duplicates.
(ii) That means the elements within a set cannot be repeated. This feature used to include membership testing and eliminating duplicate elements.
10.
Syntax:
# Tuple with n number elements
Tuple_Name (E1, E2, E3.......En)
# Elements of a tuple without parenthesis
Tuple_Name = El, E2, E3 ................. En
11.
| max( ) | Returns the maximum value in a list |
max (list) |
MyList=[21, 76, 98, 23] print(maxtMyList) Output: 98 |
| min( ) | Returns the minimum value in a list. |
min (list) |
MyList=[21, 76, 98, 23] print(min(MyList) ) Output: 21 |
| sum( ) | Returns the sum of values in a list. |
sum (list) |
MyList=[21, 76, 98, 23] print(sum(MyList) ) Output: 218 |
12.
(i) To delete an entire tuple, the del command can be used.
(ii) Syntax: del tuple_name
(iii) Example:
Tup1 = (2, 4, 6, 8, 10)
print("The elements of Tup1 is ", Tup 1)
del Tup1
print (Tup 1)
13.
(i) The len( ) function in Python is used to find the length of a list. (i.e., the number of elements in a list).
(ii) Usually, the len( ) function is used to set the upper limit in a loop to read all the elements of a list.
(iii) If a list contains another list as an element, len( ) returns that inner list as a single element.
(iv) Example: Accessing single element
> > > MySubject = ['Tamil', 'English', 'Comp', 'Science', 'Maths']
> > > len(MySubject)
4
14.
(i) List is an ordered set of elements. But, a dictionary is a data structure that is used for matching one element (Key) with another (Value).
(ii) The index values can be used to access a particular element. But, in dictionary key represents index. Remember that, key may be a nunmber of a string.
(iii) Lists are used to look up a value whereas a dictionary is used to take one value and look up another value.
15.
Set Operations :
(i) Union : It includes all elements from two or more sets.
(ii) Intersection : It includes the common elements in two sets.
(iii) Difference : It includes all elements that are in first set (say set A) but not in the second set (say set B).
(iv) Symmetric difference : It includes all the elements that are in two sets (say sets A and B) but not the one that are common to two sets.
16.
remove ( ):
(i) The remove( ) function can also be used to delete one or more elements if the index value is not known.
(ii) Syntax:
List.remove(element) # to delete a particular element
(iii) Example:
> > > MyList= [12,89,34,'Kannan', 'Gowri sankar', 'Lenin']
> > > print(MyList)
[12, 89, 34, 'Karman', 'Gowrisankar', 'Lenin')
> > > MyList.remove(89)
> > > print(MyList)
[12, 34, 'Karman', 'Gowrisankar', 'Lenin']
pop ():
(i) pop() function can also be used to delete an element using the given index value. pope ) function deletes and returns the last element of a list if the index is not given.
(ii) pop() function is used to delete a particular element using its index value, as soon as the element is deleted.
(iii) The pop( ) function shows the element which is deleted. pope ) function is used to delete only one element from a list. Remember that, del statement deletes multiple elements.
(iv) Syntax: List.pop(index of an element)
(v) Example:
> > > MyList.pop(1)
34
> > > print(MyList)
[12, 'Kannan', 'Gowrisankar', 'Lenin')
clear ():
(i) The function clear( ) is used to delete all the elements in list, it deletes only the elements and retains the list
(ii) clear() function removes only the elements and retains the list. When you try to print the list which is already cleared, an empty square bracket is displayed without any elements, which means the list is empty.
(iii) Syntax:
List.clear( )
Example:
> > > MyList.clear( )
> > > print(MyList)
[ ]
17.
In Python, a tuple can be defined inside another tuple; called Nested tuple. In a nested tuple, each tuple is considered as an element. The for loop will be useful to access all the elements in a nested tuple.
Example:
Toppers = (("Vinodini", "XII-F", 98.7), ("Soundarya", "XII-H", 97.5),
("Tharani", "XII-F", 95.3), ("Saisri", "XII-G", 93.8))
for i in Toppers:
print(i)
Output:
('Vinodini', 'XII-F', 98.7)
('Soundarya', 'XII-H', 97.5)
('Tharani', 'XII-F', 95.3)
('Saisri', 'XII-G', 93.8)
12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications களப்பெயர் முறைமை (DNS) Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு எடுத்துக்காட்டுகள் மற்றும் நெறிமுறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications கணினி வலையமைப்பு ஓர் அறிமுகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications PHP-உடன் MySQL-ஐ இணைத்தல் Sample Question Papers Study Material - QB365 Set A
Tamilnadu Stateboard 12th Standard Subjects

Maths

Chemistry

Physics

Biology

Computer Science

Business Maths and Statistics

Economics

Commerce

Accountancy

History

Computer Applications

Biology

Computer Technology

Computer Applications

Computer Science

Business Maths and Statistics

Commerce

Economics

Maths

Chemistry

Physics

Computer Technology

History

Accountancy

Tamil

English

French
Tamilnadu Stateboard Standards