Commit 84ef1251 by BellCodeEditor

save project

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