Commit d29fe417 by BellCodeEditor

save project

parent aacc01e5
Showing with 17 additions and 1 deletions
......@@ -26,7 +26,8 @@ class Player(Hero):
self.hp = 200
self.attack = 50
self.hero_type = hero_type
print("jiaose"=self.name+"hbvrhguubijbjthtthj6jhti9jutithjhjh6uhj6jhu6:",self.hero-type)
print("jiaose"+self.name+"hbvrhguubijbjthtthj6jhti9jutithjhjh6uhj6jhu6:",self.hero_
type)
print("hffj nvrnvfrjemfrvikvjvfhjhg:",self.level,self.hp,self.attack)
dhhyu = Player("vgngvnu","ejgyhj")
fnggnn = Hero("egfvbefg")
......
class Animal:
def __init__(self,name):
self.name = name
def show_info(self):
return"egvf3gfejrg :{O}".format(self.name)
def move(self):
print('run run run')
class Cat(Animal)
def __init__(self,name,age):
super().__init__(name)
self.age = age
cat = Cat("tom",2)
cat.move()
print(cat.show_info())
\ 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