0 of 8 questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 8 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
You have the potential to do better! 🙂
If you found a concept confusing on this page then please leave a comment below asking for clarity.
Try re-reading the tutorial on this page before you retake this quiz!
Good work on clearing this quiz!
Outstanding work! You have mastered this lesson. Onward to the next one!
_____ represent an entity in the real world with its identity and behaviour.
_____ is used to create an object.
What is Instantiation in terms of OOP terminology?
What is the output of the following code?
class test:
def __init__(self):
self.variable = ‘Old’
self.Change(self.variable)
def Change(self, var):
var = ‘New’
obj=test()
print(obj.variable)
Is the following piece of code correct?
>>> class A:
def __init__(self,b):
self.b=b
def display(self):
print(self.b)
>>> obj=A(“Hello”)
>>> del obj
What is the output of the following code?
class test:
def __init__(self,a):
self.a=a
def display(self):
print(self.a)
obj=test()
obj.display()
What is the output of the following code?
class change:
def __init__(self, x, y, z):
self.a = x + y + z
x = change(1,2,3)
y = getattr(x, ‘a’)
setattr(x, ‘a’, y+1)
print(x.a)
What is the output of the following code?
class test:
def __init__(self,a=”Hello World”):
self.a=a
def display(self):
print(self.a)
obj=test()
obj.display()