Commit b3fe4bd0 by BellCodeEditor

save project

parent bb723990
Showing with 11 additions and 6 deletions
class Hiro:
def __init__(self,nema,hp,attack):
class Hero:
def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
luban=Hero('鲁班',500,203)
jiajuo=Hero('伽罗'600,999999999999999)
def up():
luban.level+=1
luban.hp+=100
luban.attack+=100
luban=Hero('鲁班',500,60)
jialuo=Hero('伽罗',600,70)
up()
up()
print('鲁班的血量值为:',luban.hp)
print('鲁班的攻击力为:',luban.attack)
\ No newline at end of file
print('鲁班的攻击力为:',luban.attack)
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