Question OOP-ABS-0039
EasyWhat is the output of this code?
from abc import ABC, abstractmethod
class Animal(ABC):
@abstractmethod
def sound(self):
pass
def describe(self):
return "I say " + self.sound()
class Cow(Animal):
def sound(self):
return "moo"
print(Cow().describe())
- A.
moo
- B.
Error
- C.
Sign up free to see the answer and a step-by-step explanation.