What is the output of the following code ? class A: def __init__(self, x , y): self.x = x self.y = y @property def z(self): return self.x + self.y a = A(10, 15) b = A(‘Hello’, ‘!!!’) print(a.z) print(b.z)

QuestionsCategory: Python 3What is the output of the following code ? class A: def __init__(self, x , y): self.x = x self.y = y @property def z(self): return self.x + self.y a = A(10, 15) b = A(‘Hello’, ‘!!!’) print(a.z) print(b.z)
admin Staff asked 3 years ago

Answer: 25
Helo!!!