Commit a2de742b by BellCodeEditor

save project

parent b52b89da
Showing with 13 additions and 8 deletions
class a:
def __init__(self):
self.hp=300
self.attack=20
def __init__(self,name,hp,attack):
self.hp=hp
self.attack=attack
self.level=1
yase=a()
print(yase.attack )
print(yase.level)
print(yase.hp)
\ No newline at end of file
self.name=name
#huoyi.hp=hp
#huoyi.attack=attack
#huoyi.level=1
#huoyi.name=name
yase=a("垭瑟",300,20)
huoyi=a("后羿",240,23)
print("垭瑟的血量为:"yase.hp)
print("后羿的血量为"huoyi.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