Commit 12b8d85c by BellCodeEditor

save project

parent bdbf00d3
Showing with 3 additions and 2 deletions
......@@ -6,8 +6,9 @@ class Hero:
selt.attack = attack
def upgrade():
yase.level = yase.level + 1
yase.hp = yase.hp + 200
yase.attack = yase.attack + 100
houyi = Hero("后羿",100,23)
yase = Hero("亚瑟",200,20)
print("后羿的血量:",houyi.hp)
upgrade()
print("亚瑟的血量:",yase.hp)
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