Commit a4ef746b by BellCodeEditor

save project

parent 0a63f1a8
Showing with 22 additions and 0 deletions
def get_list():
total = []
while True:
s = input('请输入:')
if s == 'q':
break
try:
price = int(s)
except:
print('请输入数字')
else:
total.append(price)
return total
def sum(lis):
sum = 0
for i in lis:
sum += i
return sum
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