### Find the factorial of a given number

Write a program to use the loop to find the factorial of a given number.

The factorial (symbol: `!`

) means to multiply all whole numbers from the chosen number down to 1.

For example: calculate the factorial of 5

5! = 5 × 4 × 3 × 2 × 1 = 120

Expected output:

120

Hint:`factorial =1`

to store factorial of a given number`n`

using for loop and`range()`

function. (here, the loop will run five times because`n`

is 5)`factorial = factorial *i`

)`factorial`

need an explanation for this answer? contact us directly to get an explanation for this answerSolution: