Commit 5db6d357 by BellCodeEditor

save project

parent 2837d0cf
Showing with 29 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
yase=Hero('yase',1000,999999999999999999999999999999)
hy=Hero('hy',2,0)
k=Hero('K',56,1)
def yaseup():
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+1
def hyup():
hy.level=hy.level+1
hy.hp=hy.hp+50
hy.attack=hy.attack+1
def kup():
k.level=k.level+1
k.hp=k.hp+50
k.attack=k.attack+1
yaseup()
hyup()
kup()
print(yase.attack)
print(hy.attack)
print(k.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