Alternative code for Q 6 FIBO
I did the following below and it is not as fleixble as all the variables are fixed
fibo = [0,1]
for n in range(1,19):
fibo_new = fibo[-1] + fibo[-2]
fibo.append(fibo_new)
print(fibo)
0 answers ( 0 marked as helpful)