Commit 07763179 by BellCodeEditor

save project

parent 8bbb2752
Showing with 32 additions and 0 deletions
class hero:
def __init__(self,level,hp,attack):
self.level=level
self.hp=hp
self.attack=attack
def d(self):
self.level=lixin.level+1
self.hp=lixin.hp+50
self.attack=lixin.attack+3
lixin=hero(1,300,30)
lixin.d()
lixin.d()
lixin.d()
lixin.d()
lixin.d()
lixin.d()
lixin.d()
lixin.d()
lixin.d()
lixin.d()
lixin.d()
lixin.d()
lixin.d()
lixin.d()
print(lixin.level)
print(lixin.hp)
print(lixin.attack)
\ 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