Commit fbe37ae5 by BellCodeEditor

auto save

parent a6e329ea
Showing with 35 additions and 0 deletions
......@@ -14,3 +14,16 @@ class Cat:
role = Cat()
role.skill('老鼠')
class Player(Hero):
def __init__(self,name,hero_type):
super(player, self).__init__(name)
self.hp = 200
self.attack = 50
self.hero_type = hero_type
print('博客'+self.name+'走在叶虫,捉虫校园生活:', self.hero_type)
print('可就不好你看建成开放活动:',self.level,self.hp,self.attack)
houyi = Player('后羿','射手')
yase = Hero('亚瑟')
\ No newline at end of file
class Dog:
daf __init__(self):
self.footNum = 4
self.eyeNum = 2
self.head = 1
self.earsNum = 2
self.skin = 'white'
def run(Dog):
print('狗狗飞快的跑起来')
class Husky(Dog):
def __init__(self):
super().__init__()
self.skin = 'black'
coco = Husky()
print(coco.skin)
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