Commit a176c358 by BellCodeEditor

auto save

parent 7eaed43a
Showing with 25 additions and 0 deletions
def np():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
try:
a=int(unit)
except:
print("you wen ti")
else:
total.append(unit)
return total
def m(qian):
n=0
for i in qian:
n=n+int(i)
return n
v=np()
x=m(v)
print(x)
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