Commit c7e3a89d by BellCodeEditor

save project

parent e318d357
Showing with 11 additions and 0 deletions
...@@ -10,3 +10,13 @@ biggersb=Hero("李白",999,100) ...@@ -10,3 +10,13 @@ biggersb=Hero("李白",999,100)
print("孙悟空的血量为:",sb.hp) print("孙悟空的血量为:",sb.hp)
print("韩信的血量为:",bigsb.hp) print("韩信的血量为:",bigsb.hp)
print("李白的血量为:",biggersb.hp) print("李白的血量为:",biggersb.hp)
def upgrade():
sb.level = sb.level+1
sb.hp = sb.hp+100
sb.attack = sb.attack+50
upgrade()
upgrade()
upgrade()
upgrade()
upgrade()
\ 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