Commit 99c18aa9 by BellCodeEditor

save project

parent cb8e92e3
Showing with 7 additions and 1 deletions
def new_input():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
......@@ -13,5 +12,12 @@ def new_input():
else:
total.append(unit)
return total
def jisuan(money):
sum=0
for i in money:
sum=sum+i
return sum
result=new_input()
a=jisuan(result)
print(result)
print(a)
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