Commit 21c0f4c5 by BellCodeEditor

save project

parent 1ecdbc76
Showing with 13 additions and 3 deletions
...@@ -12,6 +12,16 @@ def new_input(): ...@@ -12,6 +12,16 @@ def new_input():
else: else:
total.append(unit) total.append(unit)
print("="*30) print("="*30)
print(total) #print(total)
return total
new_input() def sum(money):
\ No newline at end of file count=0
for i in money:
count+=i
return count
price = new_input()
pay = sum(price)
print("="*30)
print(f"一共消费了{pay}元")
\ 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