Commit 84d96ed3 by BellCodeEditor

save project

parent d6c81a0f
Showing with 17 additions and 0 deletions
class hero:
def __init__(self,name,hp,attack):
self.level=9999999999999
self.name=name
self.hp=hp
self.attack=attack
laoba=hero("老八",9999999999999999,99999999999999)
print(laoba.level,laoba.hp,laoba.attack)
def upgrade(heroname):
heroname.level+=1
heroname.hp+=1
heroname.attack+=1
upgrade(laoba)
print(laoba.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