Commit 96d0dadb by BellCodeEditor

auto save

parent 05e7d622
def a_wen():
s = []
while True:
a= input("请输入:")
if a== 'q':
break
try:
s.append(int(a))
except :
print('输入整数')
else:
print("-"*30)
return s
def a_ji(a):
d=0
for i in a:
d=d+i
return str(d)
\ No newline at end of file
import func
a=func.a_wen()
s=func.a_ji(a)
print(s)
\ 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