Commit 548a8cc1 by BellCodeEditor

save project

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