请问这个哪里错了?
class Animal(object):
def_init_(self,name,age):
self.name = name
self.age = age
dog = Animal('Tim',4)
cat = Animal('Aim',5)
print(dog.name)
print(dog.age)
print(cat.name)
print(cat.age)
class Animal(object):
def_init_(self,name,age):
self.name = name
self.age = age
dog = Animal('Tim',4)
cat = Animal('Aim',5)
print(dog.name)
print(dog.age)
print(cat.name)
print(cat.age)
2021-03-08
举报