Commit ab288e41 by BellCodeEditor

save project

parent 22354288
Showing with 15 additions and 0 deletions
class hero:
def __init__(self,hp,name,ak,lv):
self.hp=hp
self.name=name
self.ak=ak
self.lv=lv
def upg(self):
self.lv+=1
self.hp+=50
self.ak+=20
dio=hero(2500,'dio',200,1)
dio.upg()
print(dio.ak)
\ 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