Commit 308aed35 by BellCodeEditor

save project

parent 49aab235
Showing with 9 additions and 2 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,name,hp,attack):
\ No newline at end of file self.leavl=1
self.name=name
self.hp=hp
self.attack=attack
yase=Hero("亚瑟",500,50)
houyi=Hero("后羿",400,60)
print("亚瑟的血量是:",yase.hp)
print("后羿的血量是:",houyi.hp)
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