A factorial is the product (multiplication result) of all positive integers less than or equal to a given number. For example:
1! = 1 = 12! = 2 * 1 = 23! = 3 * 2 * 1 = 64! = 4 * 3 * 2 * 1 = 245! = 5 * 4 * 3 * 2 * 1 = 120There's also a special case for zero:
0! = 1It's just 1 by definition of the fancy math folks (ivory tower types).
Complete the factorial() function. It should return the factorial of a given number.
In mathematics, the ! symbol denotes a factorial, but is not a valid Python Factorial operator. Use a loop and multiplication to compute the proper result.