Commit 8b1a02db by BellCodeEditor

save project

parent 0bbd979b
Showing with 13 additions and 4 deletions
def vds(j):
c=0
for i in j:
c=c+i
return c
def m():
to = []
while True:
to=[]
u=input('请输入:')
if u=='q':
break
else:
try:
u=int(u)
p=int(u)
except :
print('重新输入一个整数')
else:
to.append(u)
return 0
to.append(p)
return to
ad=m()
print(ad)
s=vds(ad)
print(s)
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