Commit 1d545927 by BellCodeEditor

save project

parent d22597ef
Showing with 7 additions and 5 deletions
......@@ -4,10 +4,11 @@ class Hero:
self.hp=hp
self.attack=attack
def upgrade():
yase.level=yase.level+1
yase.attack=yase.attack+4
yase.hp=yase.hp+50
yase=Hero("YASE",300,20)
print("牙塞的血量",yase.hp)
upgrade()
upgrade()
print("升级2次后,它的血量",yase.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