def fact(n):
    if n == 1 or n == 0:
        return 1
    elif n < 0:
        return "does not exist for negative numbers"
    else:
        return n * fact(n - 1)


num = int(input("Input number: "))
print("Factorial of", num, "is", fact(num))

d1b494e2972cb29d70dfd47da64d66b807ed7243
<mask token>

def fact(n):
    if n == 1 or n == 0:
        return 1
    elif n < 0:
        return 'does not exist for negative numbers'
    else:
        return n * fact(n - 1)


<mask token>

def fact(n):
    if n == 1 or n == 0:
        return 1
    elif n < 0:
        return 'does not exist for negative numbers'
    else:
        return n * fact(n - 1)


<mask token>
print('Factorial of', num, 'is', fact(num))

def fact(n):
    if n == 1 or n == 0:
        return 1
    elif n < 0:
        return 'does not exist for negative numbers'
    else:
        return n * fact(n - 1)


num = int(input('Input number: '))
print('Factorial of', num, 'is', fact(num))

def fact(n):
    if n == 1 or n == 0:
        return 1
    elif n < 0:
        return "does not exist for negative numbers"
    else:
        return n * fact(n - 1)


num = int(input("Input number: "))
print("Factorial of", num, "is", fact(num))
