Commit b92389b2 by BellCodeEditor

save project

parent 7295b403
Showing with 8 additions and 6 deletions
...@@ -4,11 +4,12 @@ class Hero: ...@@ -4,11 +4,12 @@ class Hero:
self.LV=LV self.LV=LV
self.hp=hp self.hp=hp
self.atk=atk self.atk=atk
def up(self):
self.LV=self.LV+1
self.hp=self.hp+50
self.atk=self.atk+5
yase=Hero("yase",1,200,20) yase=Hero("yase",1,200,20)
hoyi=Hero("hoyi",1,150,24) hoyi=Hero("hoyi",1,150,24)
def up(): for i in range(10):
yase.LV=yase.LV+1 yase.up()
yase.hp=yase.hp+50 print(yase.hp)
yase.atk=yase.atk+5 \ No newline at end of file
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