Commit ca636793 by BellCodeEditor

save project

parent adef0cd1
Showing with 8 additions and 1 deletions
...@@ -10,7 +10,13 @@ def test(): ...@@ -10,7 +10,13 @@ def test():
print("请输入整数") print("请输入整数")
else: else:
total.append(unit) total.append(unit)
print(total) return total
def cal(money):
total = 0
for i in money:
total+=i
return total return total
list=test() list=test()
print(list) print(list)
totalMoney=cal(list)
print("总价是"+str(totalMoney))
\ 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