Commit 4ec5328f by BellCodeEditor

save project

parent 4d7e0d31
Showing with 8 additions and 2 deletions
...@@ -12,5 +12,11 @@ def o(): ...@@ -12,5 +12,11 @@ def o():
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=o() list=o()
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