Commit 4c499005 by BellCodeEditor

save project

parent 1c4f38b3
Showing with 10 additions and 7 deletions
...@@ -12,11 +12,14 @@ def new_input(): ...@@ -12,11 +12,14 @@ def new_input():
print("输入错了") print("输入错了")
else: else:
total.append(s) total.append(s)
return total return total
a=new_input()
print(a) def sum(money):
r=0 r=0
for i in a: for i in money:
r=r+i r=r+i
print(r) return r
\ No newline at end of file a=new_input()
c=sum(a)
print(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