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 = [] total = []
while True: while True:
unit= int(input("请输入:")) unit= int(input("请输入:"))
if unit== 'q': except:
break print("输入数字啊!!")
else: else:
total.append(unit) if unit == 0:
print(total) print(total)
total.append(unit)
SettleAccounts() \ No newline at end of file
\ 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