Your question is Factorial Function. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
A calculation within Bank of America Mobile Banking needs to evaluate factorial values for small nonnegative integers. Write a function that returns the factorial of n, written as n! = n × (n - 1) × ... × 1.
Use an iterative approach and do not call Python's built-in factorial function.
Implement factorial(n), where n is an integer. Return an integer equal to the product of every integer from 1 through n. By definition, 0! equals 1.
def factorial(n):