St. Britto Hr. Sec. School - Madurai
12th Computer Science Monthly Test - 2 ( Lists, Tuples, Sets and Dictionary )-Aug 2020
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Write a program to swap two values using tuple assignment.
-
How will you create a set using list or tuple? Give an example.
-
Give an example of joining two tuples.
-
Write a python program to generate the squares of even numbers between 1 and 10 using the concept of list comprehensions.
-
What is the use of tuple () function? Give example.
-
Explain with an example how will you create a tuple with a single element.
-
Write the equivalent python statement for the following
(i) c =A I B
(ii) C =A&B
(iii) C =A-B
(iv) C =A^ B -
What are the difference between List and Dictionary?
-
Explain the difference between del and clear( ) in dictionary with an example.
-
What are the advantages of Tuples over a list?
-
-
Write a program to define a list of countries that are a member of BRICS. Check whether a county is member of BRICS or not.
-
What is the output for the following code?
-
-
How will create a set in python? Give an example.
-
How will access all elements of a list? Explain with an example.
-
-
Write a program that has-a list of positive and negative numbers. Create a new tuple that has only positive numbers from the list.
-
Write a python program to read marks of six subjects and to print the marks scored in each subject and show the total marks.
-
-
What is nested tuple? Explain with an example.
-
Explain remove(), pop() and dear() used in list with an example.
-
What is the purpose of range( )? Explain with an example.