Commit 272a00dc by BellCodeEditor

auto save

parent 965d3515
total = []
while True:
def e():
total=[]
while True:
unit= input("请输入:")
if unit== 'q':
break
try:
s=int(unit)
except:
print('请输入整数')
else:
total.append(unit)
print(total)
try:
age=int(input('你今年几岁?'))
except:
print('你他奶奶的给老子输整数')
\ No newline at end of file
total.append(s)
return total
def n(da):
a=0
for i in da:
a=a+i
return a
import func
data=func.e()
def n(da):
a=0
for i in da:
a=a+i
return a
v=n(data)
print(v)
\ 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