Commit 9c58b517 by BellCodeEditor

save project

parent dc70412a
Showing with 25 additions and 0 deletions
def new_inout():
total = []
while True:
u=input("请输入:")
if u=="q":
break
else:
try:
a=int(u)
except:
print("请输入数字")
else:
total.append(a)
return total
def sum(money):
cound=0
for i in money:
cound=cound+i
return cound
c=new_inout()
print(c)
b=sum(c)
print(b)
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