Commit b92389b2 by BellCodeEditor

save project

parent 7295b403
Showing with 8 additions and 6 deletions
......@@ -4,11 +4,12 @@ class Hero:
self.LV=LV
self.hp=hp
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)
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)
for i in range(10):
yase.up()
print(yase.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