Commit 1b7a7819 by BellCodeEditor

auto save

parent a53e705a
Showing with 10 additions and 4 deletions
......@@ -5,10 +5,17 @@ def a():
if unit== 'q':
break
try:
int(unit)
unit=int(unit)
except:
print('输入整数,重输')
else:
total.append(unit)
print(total)
a()
\ No newline at end of file
return total
def b(money):
count=0
for i in money:
count=count+i
return count
abc=a()
pay=b(abc)
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