# Title: Factorial of a number
# Heading: Python Program to Find the Factorial of a Number
# Level: beginner
# Tags: factorial, product, for loop, n factorial
# About: Finds the factorial of a number, the product of every whole number from 1 to n, with a for loop.

def factorial(n):
    """The factorial of n: 1 * 2 * 3 * ... * n."""
    result = 1
    for number in range(1, n + 1):
        result *= number
    return result


print("5! =", factorial(5))
print("0! =", factorial(0))
