Commit 60cac253 by BellCodeEditor

save project

parent 625ad835
Showing with 9 additions and 9 deletions
class hero: class hero:
def __init__(self) def __init__(self,name,hp,attack,level):
self.attack = 10086 self.attack = attack
self.hp = 10086 self.hp = hp
self.level = 10086 self.level = level
self.name = name
yido=hero() yido=hero("yido",10086,10086,10086)
print(yido.attack) qigeqi=hero("level",7777777,7777777,7777777)
print(yido.hp) print(yido.hp)
print(yido.level) print(qigeqi.hp)
\ No newline at end of file \ 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