How To Print Fibonacci Sequence
#FIBONACCI SEQUENCE
print('FIBONACCI SEQUENCE')
n1=0
n2=1
x=str(n1)+' , '+str(n2)+' , '
n=int(input('Enter The Number of Fibonacci Terms :- '))
for i in range(n-1):
n3=n1+n2
n1=n2
n2=n3
x=x+str(n3)+' , '
y=n1+n3
print (x+str(y))
Made By :-
Nilay Saraf
Comments
Post a Comment