def fib_num(i,y):
print(" Create Fibonacci series upto ",i,"Numbers")
print(" The numbers to searched in Fibonacci series",y)
s1=1
s2=0
fib=0
j=0
count=0
while j<y:
fib=s1+s2
print("fib",fib)
s1=s2
s2=fib
j=j+1
if y==fib:
print(" Number is fibonacci series")
count+=1
break
if count==0:
print("Number is not a fibonacci number")
fib_num(10,7)
Create Fibonacci series upto 10 Numbers The numbers to searched in Fibonacci series 7 fib 1 fib 1 fib 2 fib 3 fib 5 fib 8 fib 13 Number is not a fibonacci number
def fib_num(i,y):
print(" Create Fibonacci series upto ",i,"Numbers")
print(" The numbers to searched in Fibonacci series",y)
s1=1
s2=0
fib=0
j=0
count=0
while j<y:
fib=s1+s2
print("fib",fib)
s1=s2
s2=fib
j=j+1
if y==fib:
print(" Number is fibonacci series")
count+=1
break
if count==0:
print("Number is not a fibonacci number")
fib_num(10,5)
Create Fibonacci series upto 10 Numbers The numbers to searched in Fibonacci series 5 fib 1 fib 1 fib 2 fib 3 fib 5 Number is fibonacci series