Commit b75bf20d by BellCodeEditor

save project

parent afdb1735
Showing with 8 additions and 3 deletions
...@@ -12,6 +12,11 @@ def test(): ...@@ -12,6 +12,11 @@ def test():
else: else:
total.append(unit) total.append(unit)
return total return total
def cal(money):
total=0
for i in money:
total+=i
return total
list=test() list=test()
print(list) totalMoney=cal(list)
\ No newline at end of file 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