Commit 7ff81d63 by BellCodeEditor

auto save

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