About Lesson
Math.factorial():-
The math.factorial() method returns the factorial of a number.
Note: This method only accepts positive integers.
Example
Find the factorial of a number:
import math print(math.factorial(9)) print(math.factorial(6)) print(math.factorial(12)) print(math.factorial(5)) |
Output: 362880 720 479001600 120 |