Commit 13b1d992 by BellCodeEditor

save project

parent a4f2738e
Showing with 9 additions and 4 deletions
def wdsj():
total = []
total=[]
while True:
unit= input("请输入:")
if unit== 'q':
......@@ -13,5 +13,11 @@ def wdsj():
total.append(unit)
print("-"*25)
return total
a=wdsj()
print(a)
\ No newline at end of file
def sum(huanyimo):
count=0
for i in huanyimo:
count+=i
return count
price=wdsj()
pay=sum(price)
print("消费"+str(pay)+"元")
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