Commit e9fdb6a7 by BellCodeEditor

save project

parent 2b30d34e
Showing with 9 additions and 4 deletions
......@@ -4,6 +4,12 @@ class Hero:
self.hp=hp
self.attack=attack
yase=Hero("亚瑟",200,150)
houyi=Hero("后羿",150,200)
print(yase.hp)
print(houyi.hp)
\ No newline at end of file
def upgrade()
self.hp=self.hp+100
self.attack=attack+50
upgrade()
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