Commit 039cccde by BellCodeEditor

save project

parent 259f591d
Showing with 38 additions and 2 deletions
...@@ -5,7 +5,44 @@ class hero: ...@@ -5,7 +5,44 @@ class hero:
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
def upgrade(self):
self.level=self.level+1
self.level
yase=hero("垭瑟"300,20) yase=hero("垭瑟"300,20)
houyi=hero("后羿"240,23) houyi=hero("后羿"240,23)
print("垭瑟的血量为"yase.hp) print("垭瑟的血量为"yase.hp)
print("后羿的血量为"houyi.hp) print("后羿的血量为"houyi.hp)
\ 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