Commit 45541e32 by BellCodeEditor

save project

parent 179da3f7
Showing with 8 additions and 5 deletions
class hero:
def __init__(self):
self.level=1
self.hp=300
self.attack=20
yase=hero()
def __init__(self,name,hp,attack):
self.name=name
self.hp=hp
self.attack=attack
yase=hero("亚瑟",300,20)
hoyi=hero("后羿",250,23)
print(yase.hp)
print(hoyi.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