12
What is the output of the following code?
class Dog:
def __init__(self, name):
self.name = name
def speak(self):
return self.name + ' barks'
print(Dog('Rex').speak())Easy