首先定义一个父类Animal,注意父类中函数需要一个self,类似于C++中的this,指代创建实例以后的当前对象 class Animal():def eat(self):print("eating")def act(self):print(……