Commit de4a61fc by BellCodeEditor

save project

parent 8b05abda
Showing with 8 additions and 4 deletions
...@@ -10,14 +10,17 @@ def new_input(): ...@@ -10,14 +10,17 @@ def new_input():
except: except:
print("请重新输入一个整数") print("请重新输入一个整数")
else: else:
total.append(money) total.append(money1)
print("-"*30) print("-"*30)
return total return total
print(new_input()) # print(new_input())
result=new_input() # result=new_input()
print(result) # print(result)
def sum(money): def sum(money):
count=0 count=0
for i in money: for i in money:
count=count+i count=count+i
return count return count
price = new_input()
pay = sum(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