Commit 3ea8791b by BellCodeEditor

save project

parent aba4dbf1
Showing with 5 additions and 0 deletions
...@@ -10,3 +10,7 @@ class Hero: ...@@ -10,3 +10,7 @@ class Hero:
self.attack+=4 self.attack+=4
yase=Hero("垭瑟",300,20) yase=Hero("垭瑟",300,20)
houyi=Hero("后羿",250,23) houyi=Hero("后羿",250,23)
yase.upgrade()
houyi.upgrade()
print("垭瑟的攻击力为:",yase.attack)
print("后羿的攻击力为:",houyi.attack)
\ 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