ifn==1:
return1
dic=[-1foriinxrange(n)]
dic[0],dic[1]=1,1
helper(n-1,dic)
linesize=5
file=open(‘Fibonacci.txt’,’w’)
forloopinrange(len(dic)/linesize):
line=[]
foriinrange(linesize):
line.append(dic[i+linesize*loop])
file.write(“\t”.join([str(x)forxinline])+”\n”)
file.close()
defhelper(n,dic):
ifdic[n]<0:
dic[n]=helper(n-1,dic)+helper(n-2,dic)
returndic[n]