Create a Python program that takes a number as an input and computes the factorial of that number.
7
def factorial(n):
    if n == 0:
        return 1
    else:
        return n * factorial(n-1)
    
num = 7
result = factorial(num)
print(result)