Factorial function - What is wrong with this code?

def factorial(x):
    fact = 1
    while x < 0:
        fact = fact * x
        x = x - 1
    return fact

Change
while x < 0:
to
while x > 0:

A minor mistake. Thanks for reply.