def fact(n):
    if n<0:
        return 0
    if (n==0 or n==1):
        return 1
    else:
        n * fact(n-1)
n = int(input("Enter a number"))
fact(n)
i dont know why its giving me a TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'
 
     
     
    