在线名词解释大全 - Python程序设计 - 详细

12.6Whatwillbedisplayedbythefollowingcode?classA:def__init__(self,i=0):self.i=idefm1(self):self.i+=1classB(A):def__init__(self,j=0):A.__init__(self,3)self.j=jdefm1(self):self.j+=1defmain():b=B()B.m1()print(B.i,B.j)main()

A

2 0


B

3 1


C

 4 0


D

3 0


E
4 1
正确答案:
相关推荐
扫描二维码
关注公众平台