Commit 0b4af390 by BellCodeEditor

save project

parent f9969034
Showing with 8 additions and 6 deletions
def new_input(): def new_input():
total=[] total=[]
while True: while True:
money=input('请输入(q退出):') money=input('请输入(q退出):')
if money=='q': if money=='q':
break break
...@@ -13,8 +12,11 @@ def new_input(): ...@@ -13,8 +12,11 @@ def new_input():
else else
total.append(money) total.append(money)
finally: finally:
print("-"*30) print("=============")
print(total) return total
a=new_input() def sum(money):
print(a) count=0
\ No newline at end of file for i in money:
count=count+1
return total
\ 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