📜  在 python 代码示例中找到给定整数的阶乘

📅  最后修改于: 2022-03-11 14:47:02.986000             🧑  作者: Mango

代码示例3
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