Commit 25119a88 by BellCodeEditor

save project

parent 8c99977e
Showing with 10 additions and 5 deletions
......@@ -5,16 +5,18 @@ class Hero:
self.hp=hp
self.attack=attack
def new_yase(self):
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attack+4
yase=Hero('yase',300,20)
hy=Hero('hy',250,23)
k=Hero('K',5600,199)
def new_yase(Hero):
Hero.level=Hero.level+1
Hero.hp=Hero.hp+50
Hero.attack=Hero.attack+4
new_yase(yase)
yase.new_yase()
print(yase.attack,yase.hp,yase.level)
......@@ -29,6 +31,9 @@ print(yase.attack,yase.hp,yase.level)
#print(yase.attack)
#print(hy.attack)
#print(k.attack)
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