Commit 220113fe by BellCodeEditor

save project

parent 94765189
Showing with 16 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attacr):
self.level=1
self.name=name
self.hp=hp
self.attacr=attacr
def fff(self):
self.level=self.level+1
self.hp=self.hp+50
self.attacr=self.attacr+4
yase=Hero("yase",3,100)
hy=Hero("hy",2,40)
yase.fff()
hy.fff()
print(hy.attacr)
\ 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