Commit 595015f6 by BellCodeEditor

auto save

parent f47689a4
Showing with 23 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack):
self.name='亚瑟'
self.level = 1
self.hp= 1000
self.attack= 100
self.name='后羿'
self.level = 1
self.hp= 995
self.attack= 150
yase = Hero('亚瑟',1000,100)
houyi = Hero('后羿',1000,150)
print("yase的血量值为:",yase.hp)
print("yase的攻击力为:",yase.attack)
print("houyi的血量值为:",houyi.hp)
print("houyi的攻击力为:",houyi.attack)
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