Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python factorial

import math

math.factorial(5) # Using math module

def factorial(n): # Doing it yourself
    x = 1

    for i in range(2,n+1):
        x *= i
        
    return x
 
PREVIOUS NEXT
Tagged: #python #factorial
ADD COMMENT
Topic
Name
2+9 =