Commit 8996ed39 by BellCodeEditor

save project

parent d6c81a0f
Showing with 25 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack):
self.l=1
self.n=name
self.hp=hp
self.a=attack
y=Hero('yase',300,20)
h=Hero('hy',250,23)
k=Hero('K',5600,199)
def y1():
y.l+=1
y.hp+=50
y.a+=10
def h1():
h.l+=1
h.hp+=50
h.a+=10
def h1():
h.l+=1
h.hp+=50
h.a+=10
y1()
h1()
print(y.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