Every time I try to run this code it gives me errors. I'm trying to make a function that returns the factorial of a number. I need some help:
def factorial(x):
x>0
if x == 1 or x==0:
return 1
n = x-1
while n>0:
n = x-1
m=0
m = x*n
return m
x-=1
if n ==1:
break
print factorial(4)
def factorial(x):
x>0
if x == 1 or x==0:
return 1
n = x-1
while n>0:
n = x-1
m=0
m = x*n
return m
x-=1
if n ==1:
break
print factorial(4)