Commit 5b62e3b1 by BellCodeEditor

save project

parent 37cfd0d0
Showing with 16 additions and 11 deletions
......@@ -4,16 +4,21 @@ def new_input():
unit = input("请输入:")
if unit == 'q':
break
else:
try:
a=int(money)
except:
print("请输入整数")
else:
total.append(money)
finally:
print("_"*30)
try:
a=int(unit)
except:
print("请输入整数")
else:
total.append(a)
finally:
print("_"*30)
return total
def a(b):
c=0
for i in b:
c=c+i
return c
result = new_input()
print(result)
\ No newline at end of file
pay=a(result)
print(pay)
\ 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