Commit 63b9dbc2 by BellCodeEditor

save project

parent 146679ad
Showing with 8 additions and 3 deletions
class hero: class hero:
def __init__(self): def __init__(self,name,hp,attack):
self.level=1 self.level=1
self.hp=300 self.hp=300
self.attack=200 self.attack=200
yase=hero() yase=hero('yase',300,20)
print(yase.hp) hy=hero('hy',250,23)
k=hero('k',5600,199)
print(yase.attack)
print(hy.attack)
print(k.attack)
\ 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