New ! Computer Science MCQ Practise Tests

12th Standard Computer Science English Medium Lists, Tuples, Sets and Dictionaries Reduced Syllabus Important Questions 2021

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 01:00:00 Hrs
Total Marks : 100

      Multiple Choice Questions


    15 x 1 = 15
  1. Let list1=[2,4,6,8,10], then print(List1[-2]) will result in

    (a)

    10

    (b)

    8

    (c)

    4

    (d)

    6

  2. If List=[10,20,30,40,50] then List[2]=35 will result

    (a)

    [35,10,20,30,40,50]

    (b)

    [10,20,30,40,50,35]

    (c)

    [10,20,35,40,50]

    (d)

    [10,35,30,40,50]

  3. Which of the following statement is not correct?

    (a)

    A list is mutable

    (b)

    A tuple is immutable.

    (c)

    The append() function is used to add an element.

    (d)

    The extend() function is used in tuple to add elements in a list.

  4. Let setA={3,6,9}, setB={1,3,9}. What will be the result of the following snippet?
    print(setA|setB)

    (a)

    {3,6,9,1,3,9}

    (b)

    {3,9}

    (c)

    {1}

    (d)

    {1,3,6,9}

  5. 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?

    (a)

    Symmetric difference

    (b)

    Difference

    (c)

    Intersection

    (d)

    Union

  6. Which of the following is not datatype in Python?

    (a)

    List

    (b)

    Tuples

    (c)

    String

    (d)

    Set

  7. Which of the following is an ordered collection of values?

    (a)

    Set

    (b)

    Tuples

    (c)

    List

    (d)

    Dictionary

  8. Which of the following datatype enclosed with [ ]?

    (a)

    Tuples

    (b)

    List

    (c)

    Dictionary

    (d)

    Set

  9. In li = [10,23,41,75], the negative index value of 41 is

    (a)

    2

    (b)

    -1

    (c)

    -2

    (d)

    -3

  10. If python sets - 1 as the index value for the last element is called

    (a)

    Oppositive indexing

    (b)

    Tuple indexing

    (c)

    Reverse index

    (d)

    List indexing

  11. Which function is used to set the upper limit in a loop to read all elements of a list?

    (a)

    upper ()

    (b)

    limit

    (c)

    len ()

    (d)

    loop ()

  12. Which of the following function used to include an element in a list at a desired position?

    (a)

    append ()

    (b)

    extend ()

    (c)

    insert ()

    (d)

    format ()

  13. In list, the positive index number always begin with ______________

    (a)

    Zero

    (b)

    One

    (c)

    - 1

    (d)

    0.0

  14. Iterating ______________ is faster than list.

    (a)

    List

    (b)

    Set

    (c)

    Tuples

    (d)

    Dictionary ()

  15. The function _____________ is used to join to sets in python.

    (a)

    Join ()

    (b)

    Union ()

    (c)

    Join set ()

    (d)

    Set ()

    1. 2 Marks


    10 x 2 = 20
  16. What is List in Python?

  17. What will be the value of x in following python code?
    List1=[2,4,6[1,3,5]]
    x=len(List1)

  18. Differentiate del with remove( ) function of List.

  19. What is set in Python?

  20. Write the syntax of creating list. Give example.

  21. Write a program to display element in a list ("Physics' ,"Chemistry", "Biology") using loop to get the output
    Physics
    Chemistry
    Biology

  22. State the working of pop () and clear () function.

  23. Write the output for the following code
    (i) print (list (range (1, 11,2)))
    (ii) print (list (range(2, 11,2)))

  24. Write a python program to generate the squares of even numbers between 1 and 10 using the concept of list comprehensions.

  25. Give an example of joining two tuples.

    1. 3 Marks


    10 x 3 = 30
  26. What are the advantages of Tuples over a list?

  27. What are the difference between List and Dictionary?

  28. How will you find the length of a list? Explain with an example.

  29. Fill up the following program to get the output TECM.
    list = ['T', 'E', 'C','M']
    i=0
    (i) while _________:
    (ii) ________ (MySubject[i], ________)
    (iii) ____ i = i + 

  30. How will you change the list elements in Python? Give an example.

  31. Read the following program and write the output according to the print statement mentioned
    list = ['T', 'H', 'N', 'M'']
    del list [1]
    (i) print (list)
    del list [1:3]
    (ii) print (list)
    del list
    (iii) print (list)

  32. Read the following and write the output given by the print function mentione(d)
    list = [12,89,34,79,80]
    (I) print (list. remove (34))
    (Ii) print (list. pop (1))
    (iii) print (list. clear ())

  33. Write a note on list comprehensions.

  34. 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.

  35. Write a note on Tuple assignment.

    1. 5 Marks


    7 x 5 = 35
  36. What the different ways to insert an element in a list. Explain with suitable example.

  37. How will you access elements of a list using for loop? Explain with an example

  38. Explain the following function used in list function with an example.
    (i) copy ()
    (ii) count ()
    (iii) index ()
    (iv) reverse ()

  39. Write a python program to read prices of 5 items in a list and then display sum of all the prices, product of all the prices and find the average.

  40. Explain with an example how will you return multiple values in tuples.

  41. Write a program that has a list of positive and negative numbers. Create a new tuple that has only positive numbers from the list.

  42. Write a program that has a list of positive and negative numbers. Create a new tuple that has only negative numbers from the list.

*****************************************

TN 12th Standard Computer Science free Online practice tests

Reviews & Comments about 12th Standard Computer Science English Medium Lists, Tuples, Sets and Dictionaries Reduced Syllabus Important Questions 2021

Write your Comment