ggg.py 323 Bytes Edit 1 2 3 4 5 6 7 8 9 10 11 12 class Cat: def __init__(self,type,color,price): self.footNum = 4 self.type = type self.color = color self.price = price def say_price(self): print("波斯猫价格为"+str(self.price)+"元") aninal = Cat("波斯猫","white",4000) aninal.say_price()