Commit b01cfd75 by BellCodeEditor

save project

parent bc3afb6f
Showing with 5 additions and 3 deletions
class Hero: class Hero:
def__init__(self,姓名,血量,攻击力): def __init__(self,姓名,血量,攻击力):
self.等级=1 self.等级=1
self.姓名=姓名 self.姓名=姓名
self.血量=血量 self.血量=血量
self.攻击力=攻击力 self.攻击力=攻击力
瑞雯=Hero(瑞雯,300,20) 瑞雯=Hero("瑞雯",300,20)
习景舒=Hero(习景舒,999,299) 习景舒=Hero("习景舒",999,299)
print("习景舒的攻击力为",习景舒.攻击力)
print("瑞雯的攻击力为",瑞雯.攻击力)
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