Question: So I'm learning python so I'm going through some project euler problems. And I'm not sure if this is a python problem I'm having, or just me being retarded, but I seem to be getting the wrong answer for problem 53. Here's a link to the problem <http://projecteuler.net/index.php?section=problems&id=53>

and this is my code:

```

from math import factorial

def ncr(n,r):
    return (factorial(n)/(factorial(r)*factorial(n-r)))

i = 0

for x in range(1,100):
    for y in range(0,x):
        if(ncr(x,y) > 1000000):
            i=i+1

print i

```

I'm getting 3982 which is apparently the wrong answer. Is something wrong that I'm doing that's specific to python?

Answer: 
`range( a, b)` does not include `b`.
Note that n is greater than or equal to 1 **AND** smaller than or equal to 100. Currently your n goes from 1 to 99. You can use [xrange](http://docs.python.org/library/stdtypes.html#xrange-type) too.

```
from math import factorial

def ncr(n,r):
    return (factorial(n)/(factorial(r)*factorial(n-r)))

i = 0

for x in range(1,101):
    for y in range(1,x+1):
        if(ncr(x,y) > 1000000):
            i=i+1

print i

```