Where is my below python code failing?
<p>if the function call is like: backwardsPrime(9900, 10000) then output should be [9923, 9931, 9941, 9967]. Backwards Read Primes are primes that when read backwards in base 10 (from right to left) are a different prime. It is one of the kata in Codewars and on submitting the below solution, I am getting the following error: </p>

<p>Traceback:
   in 
  File "./frameworks/python/cw-2.py", line 28, in assert_equals
    expect(actual == expected, message, allow_raise)
  File "./frameworks/python/cw-2.py", line 18, in expect
    raise AssertException(message)
cw-2.AssertException: [1095047, 1095209, 1095319] should equal [1095047, 1095209, 1095319, 1095403]</p>

<pre><code>import math
def isPrime(num):
    #flag = True
        rt = math.floor(math.sqrt(num))
        for i in range(2,int(rt)+1):
            if num % i == 0:
                return False

        else:
            return True    


    def Reverse_Integer(Number):
        Reverse = 0
        while(Number &gt; 0):
            Reminder = Number %10
            Reverse = (Reverse *10) + Reminder
            Number = Number //10
        return Reverse

    def backwardsPrime(start, stop):
        s = list()

        for i in range(start,stop):
            if i&gt;9 and i != Reverse_Integer(i):
                if isPrime(i) and isPrime(Reverse_Integer(i)):
                    s.append(i)
            else:
                continue
         return s
</code></pre>

<p>The Codewars have their own test functions. Sample test case below:</p>

<p>a = [9923, 9931, 9941, 9967]</p>

<p>test.assert_equals(backwardsPrime(9900, 10000), a)          </p>

<p>Looks like your code passes the test when run manually. Maybe they range to scan over is set wrong on the test causing it to miss the last one?</p>

<pre><code> backwardsPrime(1095000, 1095405)
 [1095047, 1095209, 1095319, 1095403]
</code></pre>

<p>e.g. the second parameter is set to <code>1095400</code> or something.</p>

python primes