Commit 5f8a17ea by BellCodeEditor

auto save

parent 1bf3a1a6
Showing with 12 additions and 6 deletions
...@@ -13,9 +13,15 @@ def new_input(): ...@@ -13,9 +13,15 @@ def new_input():
list1.append(nuit) list1.append(nuit)
print('-'*30) print('-'*30)
return list1 return list1
list2 = new_input()
sum = 0
for i in list2: def sum(money):
sum += i count = 0
print("所有菜总价为:",end = ' ') for i in money:
print(sum) count += i
return count
price = new_input()
total = sum(price)
print("菜价总数是:",total)
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