I have the following code to calculate n!

```
import numpy as np

print "n! (for n<31)"
print

n = input("Enter n: ")

lst = []
for i in range(1,n+1):
    lst.append(i)

print lst     #Just to see if the program is working

print "n!: ", np.prod(lst)

```

However, for some numbers, the program returns a negative value. 

Eg. 
The following is from the console when I ran it for n = 20:

```
n! (for n<31)

Enter n: 20
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
n!:  -2102132736

```

It also happens for n = 32
However, the program does work for other numbers, eg. 3! returns 6, as it should. 

Can someone please explain.