Commit 095c4786 by BellCodeEditor

save project

parent 1feef12c
Showing with 14 additions and 1 deletions
total = [] total = []
def a(): def a():
while True: while True:
unit= input("请输入:") unit= input("请输入:")
...@@ -11,5 +12,10 @@ def a(): ...@@ -11,5 +12,10 @@ def a():
print('输入错误,请重新输入一个数字') print('输入错误,请重新输入一个数字')
else: else:
total.append(unit) total.append(unit)
print(total)
a() a()
c=0
for i in total:
c=c+i
print(total)
print('您一共消费了' + str(c) + '元!扫描还是现金呢?')
\ No newline at end of file
price=[15,18,14,25]
l=0
for i in price:
l=l+i
print(i)
\ No newline at end of file
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