Commit d6cf4c20 by BellCodeEditor

save project

parent 22354288
Showing with 20 additions and 0 deletions
class Hero:
def __init__(self,hp,level,attack):
self.level=level
self.hp=hp
self.attack=attack
#hy=Hero('hy',250,23)
#k=Hero('K',5600,199)
#print(hy.attack)
#print(k.attack)
def qq(self):
self.hp+=50
self.level+=1
self.attack+=4
hy=Hero(100,30,50)
hy.qq()
print(hy.hp)
print(hy.level)
print(hy.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