Commit c7e3a89d by BellCodeEditor

save project

parent e318d357
Showing with 12 additions and 2 deletions
...@@ -9,4 +9,14 @@ bigsb=Hero("韩信",1000,99) ...@@ -9,4 +9,14 @@ bigsb=Hero("韩信",1000,99)
biggersb=Hero("李白",999,100) biggersb=Hero("李白",999,100)
print("孙悟空的血量为:",sb.hp) print("孙悟空的血量为:",sb.hp)
print("韩信的血量为:",bigsb.hp) print("韩信的血量为:",bigsb.hp)
print("李白的血量为:",biggersb.hp) print("李白的血量为:",biggersb.hp)
\ No newline at end of file
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