Commit b88277cf by BellCodeEditor

save project

parent e931ad60
Showing with 9 additions and 0 deletions
......@@ -6,4 +6,12 @@ class Hero:
self.gongji = gongji
yase = Hero("亚瑟",300,20)
hoyi = Hero("后羿",230,23)
cuishiyuan = Hero("催逝员",300,50)
def shenji():
yase.dengji=yase.dengji+1
yase.hp=yase.hp+50
yase.gongji=yase.gongji+4
shenji()
print("后羿血量:",hoyi.hp)
print("亚瑟血量:",yase.hp)
print("催逝员血量:",cuishiyuan.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