Question OOP-INH-0037
EasyWhat is the output of this code?
class A:
def __init__(self):
self.x = 1
class B(A):
def __init__(self):
super().__init__()
self.y = 2
b = B()
print(b.x + b.y)
- A.
12
- B.
2
- C.
Sign up free to see the answer and a step-by-step explanation.