Q7.webp
Enmu90

Q7.webp

  • Media owner Enmu90
  • Ngày thêm
Kizspy | Question: 7
(Choose 1 answer)
What is output of the sample code?
class A:
def
_init_(self):
self.calcl(30)
def calcl(self, i):
self.i=2;
class B(A):
def __init__(self):
super().__init__()
print("i from B is", self.i)
def calcl(self, i):
self.i = 3* i;
b=B()
A. The _init_method of only class B gets invoked.
B. The _init_method of class A gets invoked and it displays "i from B is 0".
C. The init_method of class A gets invoked and it displays "i from B is 60"
D. The _init_method of class A gets invoked and it displays "i from B is 90".

Thông tin

Category
PFP191
Thêm bởi
Enmu90
Ngày thêm
Lượt xem
833
Lượt bình luận
3
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom