Commit 4a375e6b by BellCodeEditor

save project

parent 48929271
Showing with 9 additions and 3 deletions
......@@ -5,6 +5,11 @@ class hero:
self.hp=hp
self.attack=attack
lq=hero("狂铁",300,25)
gyd=hero("云中君",250,22)
print(lq.name)
print(gyd.hp)
print(lq.hp)
def upgrade():
lq.level=lq.level+1
lq.hp=lq.hp+55
lq.attack=lq.attack+10
upgrade()
upgrade()
print(lq.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