Factorial using Python

 

Factorial using Python:


Source Code:


def factorial(number):

    dec = 1

    for i in range(number, 1, -1):

        dec *= i

    return dec


print("Factorial is : " + str(factorial(int(input(" -> ")))))



Post a Comment

0 Comments