Commit 7adc9884 by BellCodeEditor

save project

parent 30564493
Showing with 17 additions and 6 deletions
......@@ -2,7 +2,7 @@ def new_inpot():
total = []
while True:
unit= input("请输入:")
if unit== 'q'
if unit== 'q':
break
else:
......@@ -12,11 +12,22 @@ def new_inpot():
print("sb")
else:
total.append(unit)
finally:
print("-"*30)
return total
result=new_inpot()
print(result)
count=0
def sum(money):
count=0
for i in money:
count=count+i
return count
price=new_inpot()
sum(price)
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