New ! Computer Science MCQ Practise Tests



Python Classes and Objects Book Back Questions

12th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 00:45:00 Hrs
Total Marks : 30
    5 x 1 = 5
  1. Functions defined inside a class:

    (a)

    Functions

    (b)

    Module

    (c)

    Methods

    (d)

    section

  2. Class members are accessed through which operator?

    (a)

    &

    (b)

    .

    (c)

    #

    (d)

    %

  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. Which of the following is the private class variable?

    (a)

    __num

    (b)

    ##num

    (c)

    $$num

    (d)

    &&num

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

    (a)

    Constructor

    (b)

    Destructor

    (c)

    Initialize

    (d)

    Instantiation

  6. 3 x 2 = 6
  7. What is class?

  8. How will you create constructor in Python?

  9. What is the purpose of Destructor?

  10. 3 x 3 = 9
  11. What are class members? How do you define it?

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

  13. How to define constructor and destructor in Python?

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

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

Reviews & Comments about 12th Computer Science - Python Classes and Objects Book Back Questions

Write your Comment