Commit 33ad62b5 by BellCodeEditor

save project

parent dc70412a
Showing with 26 additions and 0 deletions
def fc():
total = []
while True:
money= input("请输入:")
if money== 'q':
break
try:
money = int(money)
except:
print("输整数 ")
else:
total.append(money)
return total
result=fc()
def w(s):
a=0
for i in s:
a=a+i
return a
e=w(result)
print(e)
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