Commit 2d867520 by BellCodeEditor

save project

parent d6c81a0f
Showing with 16 additions and 0 deletions
class hero:
def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
lubanqihao=hero("鲁班七号",100,1)
anqila= hero("安琪拉",1,1)
print("鲁班七号的爆炸时间:"+str(lubanqihao.hp))
def upgrade():
lubanqihao.level=lubanqihao.level+1
lubanqihao.hp+=50
lubanqihao.attack+=1000
upgrade()
print(lubanqihao.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