Computer Science, asked by negajod963, 5 months ago

find factorial of number using python​

Answers

Answered by jai696
11

\large\mathsf\color{pink}{Solution\: using\: python\: 3}

def find_factorial(n):

if n == 1 or n == 0:

return 1

factorial = 1

for x in range(1, n + 1, 1):

factorial *= x

return factorial

n = int(input("enter a number: "))

print(f"Factorial of {n} = {find_factorial(n)}")

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Answered by Oreki
2

{\bf C ode}

   \texttt{from math import factorial}\\\texttt{print("Factorial -", factorial(int(}{\tt inp ut}\texttt{("Number : "))))}

{\bf O utput}

   \texttt{Number : \textit{13}}\\\texttt{Factorial - 6227020800}

Similar questions