Commit bbee3e4f by BellCodeEditor

save project

parent 2421de44
Showing with 5 additions and 1 deletions
......@@ -3,8 +3,12 @@ class Hero:
self.level=name
self.hp=hp
self.attack=attack
def u(self):
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attck+4
yase=Hero("亚瑟",300,20)
houyi=Hero("后羿",240,23)
print(yase.hp)
print(houyi.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