The error message is Oops, try again. factorial(3) returned 1 instead of 6. I don't know why it does this because for x =1 it should go to if x >=3 ... also, is there a quicker way to do this?

```
def factorial(x):
n = 0
while x >= 0 :
if x == 0:
return 1
x = x - 1
elif x >= 3 or n > 0 :
n += x * (x - 1)
x = x - 1
elif x == 1:
if n > 0:
x = x - 1
return n
else:
x = x -1
return 1
else:
if n == 0:
x = x -1
return 2
else:
x = x -1
return n
```