Commit 7eae6fdf by BellCodeEditor

save project

parent 9a800ee2
Showing with 11 additions and 1 deletions
def new_tel(): def new_input():
total = [] total = []
while True: while True:
unit= input("请输入:") unit= input("请输入:")
...@@ -13,3 +13,12 @@ def new_tel(): ...@@ -13,3 +13,12 @@ def new_tel():
else: else:
total.append(unit) total.append(unit)
return total return total
def sun(money):
count=0
for i in money:
count:count+i
return count
price=new_input()
pay=sun(price)
print("您一共消费了"+str(pay)+"元!扫码还是现金呢?")
\ 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