Simple program written in Python to calculate factorial of given number.

// © 2017 TheFlyingKeyboard and released under MIT License

number = int(input("Enter number: "))

factorial = 1

for i in range(2, number + 1):
    factorial *= i

print("Factorial of", number, "is equal to", factorial)



Python Factorial
Tagged on:     

Leave a Reply

Your email address will not be published. Required fields are marked *