Commit 4b73d13b by BellCodeEditor

save project

parent dc70412a
Showing with 26 additions and 0 deletions
def ikun():
new_input=[]
while True:
sb=input('请输入')
if sb=='q':
break
else:
try:
sb=int(sb)
except:
print('你个小垃圾!!!!!')
else:
new_input.append(sb)
return new_input
print(new_input)
def sum(lbs):
sc=0
for i in lbs:
sc=sc+i
return sc
sd=ikun()
print(sum(sd))
\ 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