Commit e8a5c6f9 by BellCodeEditor

auto save

parent 61315a3a
Showing with 4 additions and 3 deletions
......@@ -13,10 +13,10 @@ class Dog: # 狗类
class Husky(Dog): # 哈士奇类
def __init__(self,name):
super().__init__()
super().__init__(name)
self.skin = 'black'
coco = Husky()
coco = Husky('coco')
coco.run()
print(coco.name + '是一只哈士奇,他有' + str(coco.footNum) + '')
print(coco.name + '是一只哈士奇,他有' + str(coco.footNum) + '条腿')
print(coco.skin)
\ No newline at end of file
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