Commit 36439865 by BellCodeEditor

save project

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