Commit f84fbdf7 by BellCodeEditor

auto save

parent 0dbc012d
Showing with 18 additions and 8 deletions
def SettleAccounts():
# def SettleAccounts():
# total = []
# while True:
# unit= int(input("请输入:"))
# if unit== 'q':
# break
# else:
# total.append(unit)
# print(total)
# SettleAccounts()
try:
total = []
while True:
unit= int(input("请输入:"))
if unit== 'q':
break
else:
total.append(unit)
except:
print("输入数字啊!!")
else:
if unit == 0:
print(total)
SettleAccounts()
\ No newline at end of file
total.append(unit)
\ 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