Commit 548a8cc1 by BellCodeEditor

save project

parent 5557a4f6
Showing with 9 additions and 7 deletions
class hero: class hero:
def __init__(self): def __init__(self,name,hp,attack):
self.leave1=1 self.leave1=1
self.hp=100 self.name=name
self.attack=1000 self.hp=hp
self.name="54188" self.attack=attack
yase=hero() yase=hero("亚瑟",100,1000)
print(yase.hp) houyi=hero("后羿",50,2000)
\ No newline at end of file print(yase.hp)
print(houyi.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