Commit d81938df by BellCodeEditor

save project

parent dc6a7379
Showing with 10 additions and 0 deletions
......@@ -15,5 +15,15 @@ print("houyi的houyi为:"houyi.attack)
upgrade()
upgrade()
print("",yase.hp)
def upgrade(self)
self.level=self.level+1
self.hp=self.hp+500
self.attack=self.attack+400
houyi=hero("houyi",24000,2300)
houyi.upgrade()
print(“等级为:”,houyi.level)
print(“血量为:”,houyi.level)
print(“攻击力为:”,houyi.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