Commit ce5adc45 by BellCodeEditor

auto save

parent f09d9851
Showing with 5 additions and 9 deletions
...@@ -4,12 +4,3 @@ class Hero: ...@@ -4,12 +4,3 @@ class Hero:
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
def upgrade(self):
self.hp=self.hp+50
self.attack=self.attack+4
houyi=Hero("后羿",250,23)
houyi.upgrade()
houyi.upgrade()
print("后羿的血量为",houyi.hp)
print("123")
\ No newline at end of file
print("123")
print("123")
\ No newline at end of file
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