Which of the following is used to create an object ?
What is the output of the following program ?
class MyClass:
def __init__(self, x="Welcome"):
self.x = x
def display(self):
print(self.x)
obj_ref = MyClass()
obj_ref.display()
What does Instantiation mean in OOPs ?
Which is a correct syntax to create an empty class ?
The methods inside a class with two underscores in the beginning and end are known as ?
What is the output of the following code ?
class AttrTest:
"""This is AttrText class doc"""
def __int__(self):
"""This is display doc """
obj = AttrTest()
print(AttrTest.__doc__)
print(obj.__doc__)
Which special method overloads == operator ?
Which operator is overloaded by __lg__() method?
Which operator is overloaded by the __or__() method ?
What is the output of the following code ?
class A:
def __init__(self):
print("__init__ is called ")
def __call__(self, *args, **kwargs):
print("__call__ is called")
a = A()
a()