Commit eba2d4c3 by BellCodeEditor

save project

parent 0c7f5fd4
Showing with 12 additions and 6 deletions
class hero: class hero:
def __init__(self): def __init__(self,name,hp,sttack):
self.hp=1000
self.level=1 self.level=1
self.name=name
anqila=hero() self.hp=hp
print(anqila.hp)
\ No newline at end of file
a=hero('a',1,1)
q=hero('q',1,5000)
anqila=hero('anqila',5000,1)
print(anqila.hp)
print(a.hp)
print(q.hp)
\ 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