Factorial

Calculate the factorial of a number (n!) using iterative multiplication.

Code

Algorithms
import math
return math.factorial(n)

Parameters

The number to calculate factorial for

Server

More Python Snippets