Explore topic-wise MCQs in Technical MCQs.

This section includes 8 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.

1.

The class has a documentation string, which can be accessed via?

A. ClassName
B. ClassName __doc__
C. __doc__
D. ClassName.__doc__
E.
Answer» E.
2.

 class test:     def __init__(self,a):         self.a=a      def display(self):         print(self.a)obj=test()obj.display()
9._____ represents an entity in the real world with its identity and behaviour.

A. A method
B. An object
C. A class
D. An operator
Answer» C. A class
3.

A class variable or instance variable that holds data associated with a class and its object is known as?

A. Class variable
B. Method
C. Operator overloading
D. Data member
Answer» E.
4.

A variable that is defined inside a method and belongs only to the current instance of a class is known as?

A. Inheritance
B. Instance variable
C. Function overloading
D. Instantiation
Answer» C. Function overloading
5.

You can delete properties on objects by using the ______ keyword.

A. delete
B. dedl
C. del
D. drop
Answer» D. drop
6.

The __________ parameter is a reference to the current instance of the class, and is used to access variables that belong to the class.

A. __init__()
B. self
C. both A and B
D. None of the above
Answer» C. both A and B
7.

All classes have a function called?

A. __init__
B. __init__()
C. init
D. init()
Answer» C. init
8.

To create a class, use the keyword?

A. new
B. except
C. class
D. object
Answer» D. object