Commit ce84b60f by BellCodeEditor

auto save

parent b100c52b
Showing with 0 additions and 6 deletions
......@@ -4,16 +4,10 @@ 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
yase = Hero("垭瑟",300,20)
houyi = Hero("后羿",200,40)
a()
print(yase.level)
print(yase.hp)
print(yase.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