Commit bc911300 by BellCodeEditor

save project

parent ad87b53f
Showing with 8 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
def up():
MK14.level=MK14.level+1
MK14.hp=MK14.hp+331
MK14.attack=MK14.attack+42
MK14 = Hero("MK114",1834,331) MK14 = Hero("MK114",1834,331)
print("MK114的hp为",MK14.hp) print("MK114的hp为",MK14.hp)
\ No newline at end of file up()
print("当前hp为",MK14.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