Commit 3c16828d by BellCodeEditor

save project

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