Commit 8acfad9e by BellCodeEditor

auto save

parent c2b317e9
Showing with 7 additions and 19 deletions
def func():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
x=int(unit)
except:
print("重输")
else:
total.append(x)
return total
def fune(t):
c=0
for i in t:
c+=i
return c
class Hero:
def _init_(self):
self.hp(300)
self.level(1)
self.attack(20)
yase=Hero()
print(yase)
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