Commit 5b62e3b1 by BellCodeEditor

save project

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