Commit 538e2d29 by BellCodeEditor

auto save

parent 6295fdde
def ac():
# 负责统计价格
def ac():
total = []
while True:
unit= input("请输入:")
......@@ -12,5 +13,17 @@ def ac():
continue
else:
total.append(unit)
print(total)
ac()
# print(total)
return total
# 计算价格
def sums(money): # 形式参数money
count = 0
for i in money:
count += i
return count
# 函数调用
# a = ac()
# b = sums(a) # 实际参数 a (来自统计价格的列表)
# print(b)
import func
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