Commit 2ddda4f3 by BellCodeEditor

auto save

parent 05e7d622
Showing with 27 additions and 0 deletions
def a(b):
c="迪和人格和人的"+b
d=a('小依')
print(d)
\ No newline at end of file
def a():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
try:
unit=int(unit)
except:
print('输入整数,重输')
else:
total.append(unit)
return total
def b(money):
count=0
for i in money:
count=count+i
return count
abc=a()
pay=b(abc)
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