Commit 24c37ed1 by BellCodeEditor

save project

parent 8c7ba1d5
Showing with 11 additions and 4 deletions
...@@ -12,7 +12,14 @@ def new_input(): ...@@ -12,7 +12,14 @@ def new_input():
else: else:
total.append(unit) total.append(unit)
finally:
print("-"*30) print("-"*30)
return total
print(total) def sum(money):
new_input() count = 0
\ No newline at end of file for i in money:
count = count + i
return count
price = new_input()
pay = sum(price)
print("一共消费"+ str(pay) + "zhifu")
\ 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