Commit 7e43c240 by BellCodeEditor

save project

parent 4851e9c1
Showing with 8 additions and 2 deletions
......@@ -13,5 +13,11 @@ def new_input():
else:
total.append(unit)
return total
def sum(unit):
j=0
for i in unit:
j=j+i
return j
result= new_input()
print(result)
\ No newline at end of file
pay=sum(result)
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