Skip to content

Instantly share code, notes, and snippets.

@ShamaUgale
Created January 7, 2021 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShamaUgale/2ce2cfb2750a4cf8cff3aed9bf782d9e to your computer and use it in GitHub Desktop.
Save ShamaUgale/2ce2cfb2750a4cf8cff3aed9bf782d9e to your computer and use it in GitHub Desktop.
Write a program that takes a parameter 'n' and prints the first n prime numbers in the Fibonacci sequence.
def FibonacciSeries(n):
    if n<=0:
        print("Incorrect input")
    elif n==1:
        return 0
    elif n==2:
        return 1
    else:
        return FibonacciSeries(n-1)+FibonacciSeries(n-2)
  
print(FibonacciSeries(10))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment