Commit cf22e3fa by BellCodeEditor

save project

parent c885db28
Showing with 2 additions and 4 deletions
def new_input(): def new_input():
total = [] total = []
while True: while True:
unit= input("请输入:'p'") unit= input("请输入:(p退出)")
if unit== 'q': if unit== 'q':
break break
else: else:
...@@ -13,10 +13,8 @@ def new_input(): ...@@ -13,10 +13,8 @@ def new_input():
total.append(money) total.append(money)
finally: finally:
print("_"*30) print("_"*30)
print(total)
new_input()
return total return total
def sum(money) def sum(money):
count = 0 count = 0
for i in money: for i in money:
count = count + i count = count + i
......
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