Commit c4e32a4f by BellCodeEditor

auto save

parent e0e27804
Showing with 11 additions and 2 deletions
...@@ -22,4 +22,13 @@ class Hero(object): ...@@ -22,4 +22,13 @@ class Hero(object):
yase = Hero("垭瑟") yase = Hero("垭瑟")
houyi= Hero("后羿") houyi= Hero("后羿")
yase.combat(houyi) yase.combat(houyi)
\ No newline at end of file
class hh(Hero):
def __init__(self,name):
super().__init__(name)
self.hp=23
self.attack=90
guo=hh('daji')
print(guo.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