Commit 2d5b3035 by BellCodeEditor

save project

parent 05e7d622
def n():
a=[]
while True:
b=input()
if b=="q":
break
else:
try:
b=int(b)
except:
print("请输入数字")
else:
a.append(b)
return a
def sum(j):
count=0
for i in j:
count=count+i
return count
#l=n()
#o=sum(l)
#print(o)
\ No newline at end of file
import func
data=func.n()
fc=func.sum(data)
print(fc)
\ 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