Commit 34c12a87 by BellCodeEditor

save project

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