Commit efcbd5e3 by BellCodeEditor

save project

parent 7ff81d63
Showing with 11 additions and 3 deletions
def new_input():
total = []
while True:
unit= input("请输入money(q退出):")
if unit== 'q':
break
else:
......@@ -15,5 +15,12 @@ def new_input():
finally:
print('-'*30)
print(total)
new_input()
return total
def sum(m):
count=0
for i in m:
count+=i
return count
price = new_input()
pay = sum(price)
print(pay)
\ 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