测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A25035. 下列代码中,c.method1()和c.method2()的输出结果分别是?( )class Parent(): def method1(self): return "Parent's method1" class Child(Parent): def method1(self): return "Child's method1" def method2(self): return super(…

单选题 困难

题目描述

下列代码中,c.method1()和c.method2()的输出结果分别是?(    )

class Parent():  
    def method1(self):  
        return "Parent's method1"  
  
class Child(Parent):  
    def method1(self):  
        return "Child's method1"  
      
    def method2(self):  
        return super().method1()  
  
c = Child()  
print(c.method1())  
print(c.method2())

选项(单选)

上一题 下一题