Commit 650e16d7 by BellCodeEditor

save project

parent 0f8f1c17
Showing with 2 additions and 12 deletions
...@@ -7,15 +7,4 @@ class Hero: ...@@ -7,15 +7,4 @@ class Hero:
swk=Hero("swk",300,30) swk=Hero("swk",300,30)
zhz=Hero("zhz",290,25) zhz=Hero("zhz",290,25)
print("孙悟空血量:"+str(swk.hp)) print("孙悟空血量:"+str(swk.hp))
print("庄周攻击力:"+str(zhz.attack)) print("庄周攻击力:"+str(zhz.attack))
\ No newline at end of file
def up():
swk.level=swk.level+1
swk.hp=swk.hp+100
swk.attack=swk.attack+10
up()
up()
print("孙悟空血量:"+str(swk.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