Commit 87326e87 by BellCodeEditor

save project

parent e531a2b4
Showing with 14 additions and 11 deletions
def new_input(): class Hero():
total = [] def __init__(self,name):
while True: self.level=1
fie = input('请输入:') self.hp=250
if fie=="q": self.attack=40
break self.name=name
else: class Player(Hero):
total.append(fie) def __init__(self,name):
print(total) super().__init__(name)
new_input() self.hp=200
\ No newline at end of file self.attack=50
\ 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