Computer Science, asked by linusaldos, 7 months ago

Create a function factorial (x) that takes an integer and returns the product of all the positive
integers less than or equalton.​

Answers

Answered by jai696
1

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

def factorial(n):

product = 1

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

product *= x

return product

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

print(factorial(n))

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

Similar questions