Commit 657659ad by BellCodeEditor

save project

parent 4697aaeb
Showing with 15 additions and 3 deletions
...@@ -12,5 +12,17 @@ def new_input(): ...@@ -12,5 +12,17 @@ def new_input():
print("请重新输入") print("请重新输入")
else: else:
total.append(unit) total.append(unit)
print(total) return total
new_input()
\ No newline at end of file
def sum(money):
count = 0
for i in money():
count=count+1
return count
price = new_input()
pay = sum(price)
print("消费"+str(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