Commit c311faca by BellCodeEditor

auto save

parent 2d1a431d
Showing with 17 additions and 6 deletions
class Hero:
def __init__(self):
def __init__(self,name,hp,attack):
self.level=1
self.hp=2400
self.attack=300
yase=Hero()
print(yase.hp)
\ No newline at end of file
self.name=name
self.hp=hp
self.attack=attack
yase=Hero('yase',2330,40)
hoyi=Hero('hoyi',1900,100)
print(yase.hp)
print(hoyi.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