Commit ea76cd96 by BellCodeEditor

auto save

parent a685abee
Showing with 15 additions and 0 deletions
class Dog:
def __init__(self,price,name):
self.price = price
print('它有4条腿')
print('它有两只眼睛')
print('它有两只耳朵')
self.price = price
self.name = name
def run(self):
print('它跑的很快')
def money(self):
print(str(self.name)+'这条狗需要'+str(self.price)+'元钱')
wangcai = Dog(10,'wangcai')
wangcai.money()
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