Commit cad71f04 by BellCodeEditor

save project

parent d77430c7
Showing with 11 additions and 4 deletions
def a():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
try:
unit= int(input("请输入:"))
except:
break
else:
total.append(unit)
return total
print(a())
\ No newline at end of file
def sum(b):
c = 0
for i in b:
c = c+i
return c
print(sum(a()))
\ 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