Commit d68a2377 by BellCodeEditor

save project

parent 8e38f910
Showing with 16 additions and 4 deletions
......@@ -17,7 +17,19 @@ class Hero(object):
info=info1+info2+info3
print(info)
exit()
class player(Hero) :
def __init__ (self,name):
super().__init__(name)
self.hp=100
self.attack=75
yase = Hero("垭瑟")
houyi= Hero("后羿")
yase.combat(houyi)
\ No newline at end of file
player=player("后羿")
print("血量为",player.hp)
print("攻击力为",player.attack)
# yase = Hero("垭瑟")
# houyi= Hero("后羿")
# yase.combat(houyi)
\ 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