That's not the cause, though. Examine your while loop. When does
x change? Also, where in the definition of a factorial is there any addition?
factorial(1) are both
n! = n * (n-1) * (n-2) * ... * 1 # n > 0
product = 1 # a good place to start
Now set up a loop that winds down to 2...
while n > 1:
product *= n
n -= 1
For this exercise we can assume that the lesson checker will only test with numbers from 0 to some positive integer. However in a more robust function we would test the inputs to be sure they are,
1. 0 or greater
3. not very large (factorials grow very rapidly)
Something to work on once you master the basic function.