Commit 6023ece0 by BellCodeEditor

save project

parent b710dc6e
Showing with 10 additions and 5 deletions
...@@ -13,9 +13,14 @@ def new_input(): ...@@ -13,9 +13,14 @@ def new_input():
total.append(unit) total.append(unit)
finally: finally:
print("-"*30) print("-"*30)
print(total) return total
a=new_input()
print(total[0]) def sum(money):
return total count=0
new_input() for i in money:
\ No newline at end of file count=count+i
print("您一共消费"+str(count)+"元")
sum(a)
\ 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