Commit c75a45e6 by BellCodeEditor

save project

parent 0754a46d
Showing with 3 additions and 2 deletions
......@@ -2,7 +2,7 @@ class Hero:
def __init__(self,name,HP,attack):
self.level=1
self.name=name
self.hp=hp
self.HP=HP
self.attack=attack
def upgrade():
yase.level=yase.level+1
......@@ -10,7 +10,7 @@ def upgrade():
yase.attack=yase.attack*4-yase.attack/2
yase=Hero('亚瑟',300,20)
print("亚瑟初始攻击:",yase.attack)
updrade()
upgrade()
print("亚瑟升级一次攻击:",yase.attack)
upgrade()
print("亚瑟升级二次攻击:",yase.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