Commit 3c16828d by BellCodeEditor

save project

parent 71ebf811
Showing with 11 additions and 4 deletions
...@@ -2,7 +2,7 @@ def new_input(): ...@@ -2,7 +2,7 @@ def new_input():
total = [] total = []
while True: while True:
unit = input("输入") unit = input("输入")
if unit == 'q' if unit == 'q':
break break
else: else:
try: try:
...@@ -10,8 +10,15 @@ def new_input(): ...@@ -10,8 +10,15 @@ def new_input():
except: except:
pint("请输入整数") pint("请输入整数")
else: else:
total.append(new) total.append(new1)
print("_"*30) print("_"*30)
return total return total
print(total) print(total)
new_input() def sum1(money):
\ No newline at end of file sum =0
for i in money:
sum = sum+i
print(sum)
return sum
c=new_input()
sum1(c)
\ 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