Commit 86474d23 by BellCodeEditor

save project

parent 9629d62a
Showing with 5 additions and 13 deletions
...@@ -2,20 +2,12 @@ total = [] ...@@ -2,20 +2,12 @@ total = []
def aaa(): def aaa():
while True: while True:
unit= input("请输入:") unit= input("请输入:")
if unit== 'q':
break
else:
try : try :
int(aaa) int(aaa)
except: except:
total.append(unit) total.append(unit)
return total else:
if unit== 'q':
break
def sam(bbb):
ccc=0
for i in bbb:
ccc+=int(i)
return ccc
#print(ccc) print(total)
\ No newline at end of file \ 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