Commit dd100ab4 by BellCodeEditor

save project

parent 1f4f43fc
Showing with 10 additions and 10 deletions
......@@ -6,16 +6,17 @@ def new_inpot():
break
else:
try:
unit=int(unit)
a=int(a)
except:
print("请输入新的数字:")
else:
total.append(unit)
return total
result=new_inpot()
print(result)
total.append(a)
print(total)
new_inpot()
\ No newline at end of file
return total
def sum(money):
coun=0
for i in money:
coun=coun+i
return coun
price=new_inpot()
pay=sum(price)
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