Commit c5d2f189 by BellCodeEditor

auto save

parent e38b4619
Showing with 7 additions and 9 deletions
class Hero:
def __init__(self,name,hp,attack):
self.hp =hp
self.attack=attack
def __init__(self,name):
self.hp =250
self.attack=40
self.level=1
self.nane=name
yase=Hero("A",300,20)
houy=Hero("B",240,27)
def a():
houy.hp +=1
houy.attack+=1
houy.level+=3
a()
yase.a()
yase.hp=yase.hp-50
print(yase.hp)
print(houy.hp)
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