Problem 2: Factorial (100pts)

Write a function that takes a positive integer \( n \) and returns its factorial.

Factorial of a positive integer \( n \) is defined as

\[ n! = \prod_{i=1}^n i = 1 \times 2 \times 3 \times \dots \times n. \]

def factorial(n):
    """Return the factorial of a positive integer n.

    >>> factorial(3)
    6
    >>> factorial(5)
    120
    """
    "*** YOUR CODE HERE ***"

Test your implementation with python ok -q factorial.