Commit 26c072b9 by BellCodeEditor

save project

parent c4c54403
Showing with 12 additions and 0 deletions
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()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment