Commit c311faca by BellCodeEditor

auto save

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