Challenge: Iterative factorial

Finish the provided factorial function, so that it returns the value n!n!

Your code should use a for loop to compute the product 1×2×3×...×n1 \times 2 \times 3 \times ... \times n. If you write the code carefully, you won't need a special case for when nn equals 00.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy