Commit 53db2b8d by BellCodeEditor

auto save

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