Commit 08a1ebea by BellCodeEditor

save project

parent 05553806
Showing with 12 additions and 7 deletions
......@@ -4,9 +4,14 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
yase=Hero('yase',300,20)
hy=Hero('hy',250,23)
k=Hero('K',5600,199)
print(yase.attack)
print(hy.attack)
print(k.attack)
\ No newline at end of file
lvbu=Hero('吕布',300,20)
zhaoyun=Hero('赵云',300,20)
diaochan=Hero('貂蝉',300,20)
nuban=Hero('鲁班',300,20)
caiwenji=Hero('蔡文姬'30020)
print("lvbu的血量值为",lvbu,hp)
print("zhaoyun的攻击力为",zhaoyun.)
print("diaochan的血量值为",diaochan.hp)
print("nuban的血量值为",nuban.hp)
print("caiwenji的血量值为",caiwenji.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