title: python program to find the primes in the fibonacci sequence
body: <p>hello all sorry to be a pain with this one. I need help with this problem for my coding class, and I can't quite figure out where to go from here.</p>
  <p>Write a function my_n_fib_primes(n) where theoutput fib_primes is a list of the first nnumbers that are both a Fibonacci number and a prime.  Note that 1 is not prime.Test using n = 9.</p>
  <p>the above is what I am supposed to do and so far I have this.</p>
  <pre><code>def my_n_fib_primes(n):
      n0=0
      n1=1
      fib_primes = []
      count = 0
      while count &lt; n:
          count += 1
          nth = n0 + n1
          n0 = n1
          n1 = nth
          fib_primes.append(n0)
      return fib_primes
  my_n_fib_primes(9)
  </code></pre>
  <p>I know I haven't made any real attempt for implementing the primes yet. I just can't quite figure out a way to implement it and only make the count go up when the number is prime.</p>
  <p>I also already have a code for finding prime numbers that returns the number 1 if the number is prime and 0 if it isn't. that code is this.</p>
  <pre><code>def my_is_prime(n):
      out = 1
      if n &gt; 1:
          for i in range(2,n//2):
              if (n % i) == 0:
                  out = 0
      else:
          out = 1
      return out
  </code></pre>
  <p>can someone point me in the right direction? thank you.</p>