Commit 107b7383 by BellCodeEditor

save project

parent dac6c349
Showing with 15 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack):
self.level = 1
self.name = name
self.hp = hp
self.attack = attack
Yao = Hero("耀",2700,200)
Lan = Hero("澜",2800,200)
LiBai = Hero("李白",3000,270)
print('耀的血量是',Yao.hp)
print('澜的血量是',Lan.hp)
print('李白的血量是',LiBai.hp)
\ 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