Commit ec849b95 by BellCodeEditor

save project

parent 32e9b956
Showing with 7 additions and 5 deletions
class Hero:
def __init__(self,name,LV):
def __init__(self,name,LV,hp,atk):
self.name=name
self.LV=LV
self.hp=LV*200
self.atk=LV*12
yase=Hero("yase",1)
hoyi=Hero("hoyi",1)
self.hp=hp
self.atk=atk
yase=Hero("yase",1,200,20)
hoyi=Hero("hoyi",1,150,24)
def up():
yase.LV=yase.LV+1
yase.hp=yase.hp+50
yase.atk=yase.atk+5
up()
print(yase.LV)
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