Commit f06362b8 by BellCodeEditor

save project

parent 9b043c08
Showing with 13 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
wo=Hero("我",1000,500)
ni=Hero("你",100,12)
print("我的血量为:",wo.hp)
print("我的攻击力为:",wo.attack)
print("你的血量为:",ni.hp)
print("你的攻击力为:",ni.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