Commit 29e2416c by BellCodeEditor

save project

parent dc70412a
Showing with 24 additions and 0 deletions
def abcd():
s=[]
while True:
w=input("请输入")
if w=='q':
break
else:
try:
w=int(w)
except:
print("请输入数字")
else:
s.append(w)
return s
def sum(mon):
c=0
for i in mon:
c=c+i
return c
x=abcd()
pay=sum(x)
print("一共"+str(pay)+"元请支付")
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