Commit 2966e4b2 by BellCodeEditor

save project

parent d6c81a0f
Showing with 17 additions and 0 deletions
class hero:
def __init__(self,l,name,hp,attack):
self.name=name
self.l=1
self.hp=hp
self.attack=attack
yase=hero(1,"yase",200,50)
houyi=hero(1,"houyi",100,100)
def shengji():
yase.l=yase.l+1
yase.hp=yase.hp+100
yase.attack=yase.attack+20
shengji()
shengji()
print(yase.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