Commit efbc4846 by BellCodeEditor

auto save

parent 22354288
Showing with 30 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack):
self.level = 1
self.name = name
self.hp = hp
self.attack = attack
def shengji():
Yao.level = Yao.level+1
Yao.hp = Yao.hp+700
Yao.attack = Yao.attack+1
def shengji1():
Lan.level = Lan.level+1
Lan.hp = Lan.hp+700
Lan.attack = Lan.attack+1
def shengji2():
LiBai.level = LiBai.level+1
LiBai.hp = LiBai.hp+700
LiBai.attack = LiBai.attack+1
Yao = Hero("耀",2700,200)
Lan = Hero("澜",2800,200)
LiBai = Hero("李白",3000,270)
shengji()
print('耀的血量是',Yao.hp)
\ 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