Commit 82eb7fd7 by BellCodeEditor

save project

parent 05e7d622
import func
data=func.ikun()
fs=func.sum(data)
print(fs)
\ No newline at end of file
def ikun():
new_input=[]
while True:
sb=input('请输入')
if sb=='q':
break
else:
try:
sb=int(sb)
except:
print('你个小垃圾!!!!!')
else:
new_input.append(sb)
return new_input
print(new_input)
def sum(lbs):
sc=0
for i in lbs:
sc=sc+i
return sc
#sd=ikun()
#print(sum(sd))
\ 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