Question OOP-INH-0066
HardWhat is the output of this code?
class Base:
def greet(self):
return "base:" + self.name()
def name(self):
return "B"
class Child(Base):
def name(self):
return "C"
print(Child().greet())
- A.
base:C
- B.
AttributeError
- C.
Sign up free to see the answer and a step-by-step explanation.