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(): def m():
to = []
while True: while True:
to=[]
u=input('请输入:') u=input('请输入:')
if u=='q': if u=='q':
break break
else: else:
try: try:
u=int(u) p=int(u)
except : except :
print('重新输入一个整数') print('重新输入一个整数')
else: else:
to.append(u) to.append(p)
return 0 return to
ad=m() ad=m()
print(ad) 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