Vidyalelo
Python · Q32

Classes and Objects in Python

Programming · Python · question 32

Q32

Is the following Python code valid? class B(object): def first(self): print("First method called") def second(): print("Second method called") ob = B() B.first(ob)

A.
It isn't as the object declaration isn't right
B.
It isn't as there isn't any __init__ method for initializing class members
C.
Yes, this method of calling is called unbounded method call
Answer
D.
Yes, this method of calling is called bounded method call

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board