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: 16/10/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.
In li = [10,23,41,75], the negative index value of 41 is
2
-1
-2
-3
2.
The keys in Python, dictionary is specified by
=
;
+
":"
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 will be the result of the following Python code?
S=[x**2 for x in range(5)]
print(S)
[0,1,2,4,5]
[0,1,4,9,16]
[0,1,4,9,16,25]
[1,4,9,16,25]
5.
If List=[17,23,41,10] then List.append(32) will result
[32,17,23,41,10]
[17,23,41,10,32]
[10,17,23,32,41]
[41,32,23,17,10]
6.
Let list1=[2,4,6,8,10], then print(List1[-2]) will result in
10
8
4
6
7.
Pick odd one in connection with collection data type
List
Tuple
Dictionary
Loop
8.
Write a program to print all elements in the list using reverse, indexing.
9.
What is nested list? Give example.
10.
Name the four collections of data types in python programming language.
11.
What is set in Python?
12.
Differentiate del with remove( ) function of List.
13.
What will be the value of x in following python code?
List 1 = [2, 4, 6[1, 3, 5]]
x = len (List 1)
14.
What is List in Python?
15.
What are the difference between List and Dictionary?
16.
List out the set operations supported by python.
17.
What will be the output of the following code?
list = [2**x for x in range(5)]
print (list)
18.
Write a shot note about sort( ).
19.
What are the difference between list and Tuples?
20.
What is nested tuple? Explain with an example.
21.
What the different ways to insert an element in a list. Explain with suitable example.
22.
-
23.
&
24.
|
25.
^
1.
(c)
-2
2.
(d)
":"
3.
(a)
Symmetric difference
4.
(b)
[0,1,4,9,16]
5.
(b)
[17,23,41,10,32]
6.
(b)
8
7.
(d)
Loop
8.
Marks = [10, 23, 41, 75]
i= -1
while i >= -4:
print (Marks[i])
i = i+-1
Output:
75
41
23
10
9.
(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] ]
10.
Python programming language has four collections of data types such as List, Tuples, Set and Dictionary.
11.
(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.
12.
| del function | remove () function | |
| (i) | del statement is used to delete elements whose index is known. | move( ) function is used to delete elements of a list if its index is unknown. |
| (ii) | The del statement can also be used to delete entire list. | The remove ( ) function can be used to delete one or more elements if the index value is not known. |
13.
4
14.
A list in Python is known as a "Sequence data type" like strings. It is an ordered collection of values enclosed within square brackets [ ]. Each value of a list is called as element.
15.
(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.
16.
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.
17.
Output: [1,2,4,8,16]
18.
Sort ( ) :
It sorts the element in list.
Syntax :
List.sort(reverse=True|False,key=myfunc)
Sorts the element in list :
Both arguments are optional
(i) If reverse is set as True, list sorting is in descending order.
(ii) Ascending is default.
(iii) Key=myFunc; "myFunc" - the name of the user defined function that specifies the sorting criteria.
Example :
MyList = [Thilothamma', "Tharani', 'Anitha','SaiSree', 'Lavanya')
MyList.sort( )
print(MyList)
MyList.sort(reverse=True)
print(MyList)
Output :
['Anitha', 'Lavanya', 'SaiSree', 'Tharani', 'Thilothamma']
['Thilothamma', 'Tharani', 'SaiSree', 'Lavanya', 'Anitha']
19.
(i) The elements of a list are changeable (mutable) whereas the elements of a tuple are unchangeable (immutable), this is the key difference between tuples and list.
(ii) The elements of a list are enclosed within square brackets[ ]. But the elements of a tuple are enclosed by parenthesis().
(iii) Iterating tuples is faster than list.
20.
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)
21.
Inserting elements in a list using insert ( ) :
(i) append ( ) function in Python is used to add more elements in a list. But, it includes elements at the end of a list.
(ii) If you want to include an element at your desired position, you can use insert ( ) function. The insert ( ) function is used to insert an element at any position of a list.
Syntax :
List.insert (position index, element)
Example :
>>> MyList=[34,98,47, Kannan,Gowrisankar','Lenin', 'Sreenivasan' ]
>>> print(MyList)
[34, 98, 47, 'Kannan', 'Gowrisankar', 'Lenin', 'Sreenivasan']
>>> MyList.insert(3, 'Ramakrishnan')
>>> print(MyList)
[34, 98, 47, 'Ramakrishnan', 'Kannan', 'Gowrisankar, 'Lenin', 'Sreenivasan']
Output : [34, 98, 47, 'Ramakrishnan', 'Kannan', 'Gowrisankar', 'Lenin', 'Sreenivasan']
(i) In the above cxample, insert( ) function inserts a new element 'Ramakrishnan' at the index value 3, ie. at the 4th position.
(ii) While inserting a new element in between the existing elements, at a particular location, the existing elements shifts one position to the right.
22.
Difference
23.
Intersection
24.
Union
25.
Symmetric difference
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