Huỳnh Hiền
New member
What will be the output of the following Python code?
A. 15
B. 60
C. An exception is thrown
D. 30
Code:
class A:
def __init__(self):
self.multiply(15)
print(self.i)
def multiply(self, i):
self.i = 4 * i;
class B(A):
def __init__(self):
super().__init__()
def multiply(self, i):
self.i = 2 * i;
obj = B()
B. 60
C. An exception is thrown
D. 30