Commit dd100ab4 by BellCodeEditor

save project

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