Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

find the factorial of a given integer in python

import math
num = 5
print("The factorial of 5 is : ", end="")
print(math.factorial(num))

# output - The factorial of 5 is : 120

# The factorial of a number is the function that multiplies the number by every natural number below it
# e.g. - 1 * 2 * 3 * 4 * 5 = 120
 
PREVIOUS NEXT
Tagged: #find #factorial #integer #python
ADD COMMENT
Topic
Name
6+3 =