Commit 86474d23 by BellCodeEditor

save project

parent 9629d62a
Showing with 9 additions and 17 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': try :
break int(aaa)
except:
total.append(unit)
else: else:
try : if unit== 'q':
int(aaa) break
except:
total.append(unit) print(total)
return total \ No newline at end of file
def sam(bbb):
ccc=0
for i in bbb:
ccc+=int(i)
return ccc
#print(ccc)
\ 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