Commit 1097f982 by BellCodeEditor

save project

parent 1218fa56
Showing with 5 additions and 2 deletions
...@@ -5,6 +5,9 @@ class Hero: ...@@ -5,6 +5,9 @@ class Hero:
self.attack= attack # attack:攻击 self.attack= attack # attack:攻击
yase = Hero('亚瑟',800,10) yase = Hero('亚瑟',800,10)
print("yase的血量值为:",yase.hp) print("亚瑟的血量值为:",yase.hp)
print("yase的攻击力为:",yase.attack) print("亚瑟的攻击力为:",yase.attack)
houyi = Hero('后羿',600,15)
print("后羿的血量值为:",houyi.hp)
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