Commit 4a83f5c5 by BellCodeEditor

auto save

parent 6aced85d
Showing with 31 additions and 22 deletions
# def SettleAccounts():
def SettleAccounts():
total = []
while True:
unit= input("请输入:")
if unit == 'q':
break
else:
try:
unit = int(unit)
except:
print("sss")
else:
total.append(unit)
return total
aa = SettleAccounts()
j = 0
for i in aa:
j = j+i
print(j)
print(aa)
# try:
# 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 < 10:
break
except:
print("输入数字啊!!")
else:
# if unit == 0:
# print("结束")
# total.append(unit)
print(11111)
# if unit < 10:
# break
# except:
# print("输入数字啊!!")
# else:
# # if unit == 0:
# # print("结束")
# # total.append(unit)
# print(11111)
print(111)
# print(111)
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