1. Created by varsha
“If this program turns out helpful to you please let me know in
the comments.”
2. What you should know?
Concept of factorials
If else concept
Basic knowledge of python code
3. Factorials: Concept
The factorial of a positive number is the product of all
numbers less than or equal to it. So…
1! = 1
2! = 1 x 2
3! = 1 x 2 x 3
4! = 1 x 2 x 3 x 4
....
100! = 1 x 2 x 3 x 4 .... 100
5. Notes about code:
“Number” is my variable for storing user’s value.
Similarly “factorial” is also a variable
Nested if condition is used to save time
For condition is similar to the code in C or C++ for
factorial i.e. its easy
In the end you get a pyramid cause computer prints all
the trials and the bottom one is the answer.