Commit 056db80d by BellCodeEditor

save project

parent ef39df1c
Showing with 13 additions and 5 deletions
class hero: class A1:
def __init__(self): def __init__(a1,name,hp,atta):
self.level=1 a1.level=1
self.hp=300 a1.name=name
self.attack=2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 a1.hp=hp
a1.atta=atta
a2Y=A1("垭瑟",300,20)
a3H=A1("后羿",240,23)
print("垭瑟的血量值为",a2Y.hp)
print("后羿的血量值为",a3H.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