Commit f92cfc2d by BellCodeEditor

save project

parent d0e3435b
Showing with 19 additions and 3 deletions
......@@ -4,7 +4,23 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
def upgrade():
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+40
yase=Hero('亚索',700,34)
hy=Hero('深渊女皇',250,23)
print("亚索的血量"yase.attack)
print("深渊女皇的血量"hy.attack)
print("亚索的血量",yase.attack)
upgrade()
upgrade()
print("↑2次后,亚索的血量是:",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