New ! Computer Science MCQ Practise Tests



Python Classes and Objects Model Question Paper

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 01:00:00 Hrs
Total Marks : 40
    6 x 1 = 6
  1. Functions defined inside a class:

    (a)

    Functions

    (b)

    Module

    (c)

    Methods

    (d)

    section

  2. Which of the following method is automatically executed when an object is created?

    (a)

    __object__( )

    (b)

    __del__( )

    (c)

    __func__( )

    (d)

    __init__( )

  3. Which of the following class declaration is correct?

    (a)

    class class_name

    (b)

    class class_name<>

    (c)

    class class_name:

    (d)

    class class_name[ ]

  4. The process of creating an object is called as:

    (a)

    Constructor

    (b)

    Destructor

    (c)

    Initialize

    (d)

    Instantiation

  5. Which of the following is not an object oriented language?

    (a)

    C

    (b)

    C++

    (c)

    Java

    (d)

    Python

  6. Functions of the class are called as

    (a)

    Methods

    (b)

    Members

    (c)

    Variables

    (d)

    Loog

  7. 2 x 1 = 2
  8. Which of the following is correct declaration of constructor?
    (a) - - init - -
    (b) - - init- - ()
    (c) - - classname - - ()
    (d) - - classname - - ()

  9. Ghoose the correct statement from the following
    (a) objectname = classname
    (b) objectname: classname ()
    (c) objectname = classname ()
    (d) objectname:: classname ()

  10. 4 x 2 = 8
  11. What is class?

  12. What is instantiation?

  13. What is the output of the following program?
    Class Sample:
    __num=10
    def disp(self):
    print(self.__num)
    S=Sample()
    S.disp()
    print(S.__num)

  14. What is the purpose of Destructor?

  15. 3 x 3 = 9
  16. What are class members? How do you define it?

  17. Write a class with two private class variables and print the sum using a method.

  18. What is the output of the following program?
    class Greeting:
    def __init__(self, name):
    self.__name = name
    def display(self):
    print("Good Morning ", self.__name)
    obj=Greeting ('Bindu Madhavan')
    obj.display()

  19. 3 x 5 = 15
  20. Write a menu driven program to add or delete stationary items. You should use dictionary to store items and the brand.

  21. Write a program to calculate area and circumference of a circle.

  22. Write a program to accept a string and print the number of uppercase, lowercase, vowels, consonants and spaces in the given string.

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

Reviews & Comments about 12th Computer Science - Python Classes and Objects Model Question Paper

Write your Comment