Commit 5db2b39e by BellCodeEditor

auto save

parent 10e59985
Showing with 2 additions and 18 deletions
class Hero: input()
def __init__(self,name,hp,attack): \ No newline at end of file
self.level=1
self.name=name
self.hp=hp
self.attack=attack
def shengji(self):
self.level=yase.level+1
self.hp=yase.hp+200
self.attack=yase.attack+5
yase=Hero('yase',300,20)
hy=Hero('hy',250,23)
k=Hero('K',5600,199)
yase.shengji()
print(yase.attack)
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