Commit f1dc6a1d by BellCodeEditor

save project

parent 05e7d622
def new_input():
listA=[]
while True:
a=input()
b=0
if a=='q':
break
else:
try:
b=int(a)
except:
pass
else:
listA.append(b)
return listA
def sum(li):
s=0
for i in li:
s+=i
return s
\ No newline at end of file
import myf
s=myf.new_input()
print( myf.sum(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