Commit 5f8a17ea by BellCodeEditor

auto save

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