user
Create a function that takes an integer as an argument, and prints out its factorial.


assistant
def factorial(num):
    if num == 0:
        return 1
    else:
        return num * factorial(num - 1)