Commit ebd2290d by BellCodeEditor

save project

parent dc70412a
Showing with 31 additions and 0 deletions
def new_input():
mbjg=[]
while True:
lkoj=input("请输入")
if lkoj=="q":
break
else:
try:
lkoj=int(lkoj)
except:
print("请输入一个整数")
else:
mbjg.append(lkoj)
print("_"*30)
return mbjg
def sum(money):
kkk = 0
for i in money:
kkk=kkk+i
return kkk
cfsd = new_input()
pay = sum(cfsd)
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