Commit fe182149 by BellCodeEditor

save project

parent edfe053a
Showing with 11 additions and 4 deletions
......@@ -11,7 +11,15 @@ def a():
print('请重新输入一个数字')
else:
total.append(unit)
print('-'*30)
finally:
print('-'*30)
return total
result=a()
print(result)
\ No newline at end of file
def sum(money):
count=0
for i in money:
count=count+i
return count
price=a()
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