Commit 590b8068 by BellCodeEditor

save project

parent 759c328e
Showing with 12 additions and 4 deletions
...@@ -4,7 +4,14 @@ class hero: ...@@ -4,7 +4,14 @@ class hero:
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
self.name=name self.name=name
houyi=hero('houyi',300,20)
kai=hero('kai',30,20000000000000000000000000000000000000000000) def upgrade():
print(kai.hp) kai.level=kai.level+1
print(houyi.attack) kai.hp=kai.hp+50
kai.attack=kai.attack+4
kai = hero('kai',300,99999999999999999999999999999999999999999999999999999999999999999)
print("凯的血量:",kai.hp)
upgrade()
upgrade()
print("凯的血量:",kai.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