Commit 60cac253 by BellCodeEditor

save project

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