Commit 345679ff by BellCodeEditor

auto save

parent 614daa05
Showing with 9 additions and 2 deletions
...@@ -4,6 +4,12 @@ class Hero: ...@@ -4,6 +4,12 @@ class Hero:
self.name = name self.name = name
self.hp = hp self.hp = hp
self.attack = attack self.attack = attack
kai=Hero('凯',300,999) lan=Hero('澜',300,999)
print(kai.hp) print(lan.hp)
def upgrade():
lan.level+=1
lan.hp+=40
lan.attack+=100
upgrade()
print(lan.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