Commit 53db2b8d by BellCodeEditor

auto save

parent 0784383b
Showing with 26 additions and 21 deletions
def new_input():
total = []
while True:
money = input('请输入(q退出):')
if money == 'q':
break
else:
try:
money = int(money)
except:
print("请重新输入一个数字")
else:
total.append(money)
return total
result = new_input()
print(result)
# def new_input():
# total = []
# while True:
# money = input('请输入(q退出):')
# if money == 'q':
# break
# else:
# try:
# money = int(money)
# except:
# print("请重新输入一个数字")
# else:
# total.append(money)
# return total
# result = new_input()
# print(result)
# def sun(aa):
# a=0
# for i in aa:
# a=a+i
# return a
# def a(e):
# s=0
# for i in e:
# s+=i
# return s
# list=[4,3,5,12,34,123]
# sum=a(list)
# print(sum)
print('我的fenshu',12,'你好')
\ 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