Question OOP-INH-0008
MediumWhat is the output of this code?
class Animal:
def speak(self):
return "Some sound"
class Dog(Animal):
def speak(self):
return "Woof"
print(Dog().speak())
- A.
Error
- B.
Some sound Woof
- C.
Sign up free to see the answer and a step-by-step explanation.