Commit 08a1ebea by BellCodeEditor

save project

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