Commit 417f60d7 by BellCodeEditor

save project

parent 71604c49
Showing with 8 additions and 5 deletions
class Hero:
def __init__(self):
self.level = 1
self.hp = 300
self.attack = 20
yase = Hero()
print("亚瑟血量值:"+str(yase.hp)
self.name = name
self.hp = hp
self.attack = attack
yuyi = Hero("雨衣",10000,10000)
chenshi = Hero("chensi",10000,10000)
print(chenshi.name+"攻击力是:"+str(chenshi.attack))
print(yuyi.name+"攻击力:"+str(yuyi.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