Commit 4ec5328f by BellCodeEditor

save project

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