1、小明最近学了Python的继承,写了一段代码,看看他写的对么? class Animal(object): def run(self): print('Animal is running...') class Dog(Animal): def run(): print('Dog is running...') class Cat(Animal): def run(): print('Cat is running...') dog = Dog() dog.run() cat = Cat() cat.run() A.
5行和8行括号内加self B.
10行12行括号内加self C.
2行self去掉 D.
没有错误
5行和8行括号内加self B.
10行12行括号内加self C.
2行self去掉 D.
没有错误