Commit 7295b403 by BellCodeEditor

auto save

parent 1500be68
Showing with 6 additions and 7 deletions
...@@ -4,12 +4,11 @@ class Hero: ...@@ -4,12 +4,11 @@ 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)
yase.up() 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) print(yase.LV)
print(yase.hp)
print(yase.atk)
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