Q:

To find the 9th Fibonacci Prime number

I'm not sure if this is the right place to ask but  I have run into a wall, code-wise. I am trying to find the 9th Fibonacci number which is a Prime number but am having problems. First, my function to check if the number is Prime returns None for single digit prime numbers (2,3,5,7). Next, I think the value I'm looking for is 514229 as shown here but my program shows gives me the value 17711 as the 9th Fibonacci prime which is incorrect. My code is posted below:
def isPrime(n):

    n = abs(int(n))

   if n < 2:
        return False

    elif n == 2:
        return True

    elif not n & 1:
        return False

    else:
        for x in range(3, n/2):
            if n % x == 0:
                return False
            return True

def chkFibonacci():

    num1 = 1
    num2 = 1
    mySum = 0
    ctr = 0
    choice = 'n'

    while (choice != 'y'):
        mySum = num1+num2
        #print mySum
        if (isPrime(mySum)== True):
            ctr = ctr + 1
            print mySum
            if (ctr == 9):
                print mySum
                break
        num1 = num2
        num2 = mySum    

chkFibonacci()
print isPrime(3)

Any help is appreciated. Thanks in advance!!

A:

return True in the else branch of isPrime seems to be indented too much.

