" /> -->

Python Classes and Objects Model Question Paper

12th Standard EM

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 01:00:00 Hrs
Total Marks : 40
    5 x 1 = 5
  1. A private class variable is prefixed with

    (a)

    __

    (b)

    &&

    (c)

    ##

    (d)

    **

  2. Which of the following method is used as destructor?

    (a)

    __init__( )

    (b)

    __dest__( )

    (c)

    __rem__( )

    (d)

    __del__( )

  3. Which of the following is the private class variable?

    (a)

    __num

    (b)

    ##num

    (c)

    $$num

    (d)

    &&num

  4. Functions of the class are called as

    (a)

    Methods

    (b)

    Members

    (c)

    Variables

    (d)

    Loog

  5. Which of the following is valid syntax for crating objects?

    (a)

    objectname = classname ()

    (b)

    objectname: classname ()

    (c)

    objectname = classname

    (d)

    classname = Objectname ()

  6. 5 x 2 = 10
  7. What is instantiation?

  8. What is the purpose of Destructor?

  9. Differentiate python class function and ordinary function.

  10. Write a program in python that illustrate the use of constructor.

  11. Write a note on public and private data members of python class.

  12. 5 x 3 = 15
  13. Write a class with two private class variables and print the sum using a method.

  14. How do define constructor and destructor in Python?

  15. Write a python program to find total and average marks using class.

  16. Write a python program that illustrate the use of destructor.

  17. Read the following program. Answer the following question. Class sample:
    x, y= 10, 20
    s= sample ()
    print (s. x + s. y)
    1. What does sample denotes?
    2. What does x, y denotes?
    3. What does s denotes?

  18. 2 x 5 = 10
  19. Write a menu driven program that keeps record of books available in you school library.

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

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

TN 12th Standard EM Computer Science free Online practice tests

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

Write your Comment