Commit 3660e3a9 by BellCodeEditor

save project

parent 70850cf8
Showing with 14 additions and 0 deletions
class Hero:
def __init__(self,level,name,age,height,attack):
self.level = level
self.name = name
self.age = age
self.height = height
self.attack = attack
yase = Hero(1,'亚瑟','12',160,20)
houyi = Hero(1,'后羿','13',150,40)
print('亚瑟的攻击力是:',yase.attack)
print('后羿的攻击力是:',houyi.attack)
\ 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