Commit 5c763055 by BellCodeEditor

save project

parent d6c81a0f
Showing with 15 additions and 0 deletions
class hero:
def __init__(self,name,hp,attack):
self.level=1
self.n=name
self.h=hp
self.a=attack
def senji(self):
self.level=self.level+1
self.h=self.h+10
self.a=self.a+100
app=hero('app',1000,10000)
abb=hero('abb',10000,1000)
app.senji()
print(app.h)
\ 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