Commit 18b4ee3d by BellCodeEditor

save project

parent fb34420a
Showing with 11 additions and 3 deletions
...@@ -10,5 +10,13 @@ def new_input(): ...@@ -10,5 +10,13 @@ def new_input():
except: except:
print('请输入整数') print('请输入整数')
return total return total
a=new_input() def sum(money):
print(a) b=0
\ No newline at end of file for i in money:
b+=i
return b
c=new_input()
a=sum(c)
print('总共需要'+str(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