Commit 768b7ced by BellCodeEditor

save project

parent 6ac9689b
Showing with 9 additions and 2 deletions
......@@ -13,5 +13,12 @@ def a_in():
total.append(unit)
finally:
print("-"*30)
return total
def sum(unit):
c=0
for i in unit:
c=c+i
return c
r=a_in()
print(f)
\ No newline at end of file
pay=sum(r)
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