Write a python function to check whether the given number is fibonacci or not
Topic: Write a python function to check whether the given number is fibonacci or not
Solution
def fiboacci_number_check(n): if(isinstance(n,int)): result = list(filter(lambda num : int(math.sqrt(num)) * int(math.sqrt(num)) == num, [5*n*n + 4,5*n*n - 4] )) return bool(result) else: raise TypeError("Input should be of type Int")
List all Python Programs