Commit c60400e7 by BellCodeEditor

save project

parent 128401c7
Showing with 1 additions and 23 deletions
total = []
def in_input():
while True:
unit= input("请输入:")
try:
o=int(unit)
except:
if unit== 'q':
break
else:
print('输入整数')
continue
else:
total.append(o)
return total
in_input()
def f(l):
v=0
for i in l:
v=v+i
print(v)
f(total)
\ No newline at end of file
l=open(r'C:\Users\Administrator\Desktop','w',encoding='utf-8')
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