Commit 822c8090 by BellCodeEditor

auto save

parent eba40d2e
Showing with 5 additions and 5 deletions
......@@ -4,15 +4,15 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
def a(self):
self.level=self.level+1
self.hp=self.hp+100
self.attack=self.attack+4
def a(self):
self.level += 1
self.hp += 100
self.attack += 4
yase = Hero("垭瑟",300,20)
houyi = Hero("后羿",200,40)
a()
Hero.a(yase)
print(yase.level)
print(yase.hp)
......
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