Python Program to Calculate Factorial of a Number

Factorial of an integer is the product of the integer and all the integers below it; e.g. factorial five ( 5! ) is equal to (5*4*3*2*1) =120

  1. #Python Program to calculate factorial of a number
  2. n=int(input("Enter number of rows: "))
  3. fact=1
  4. for i in range(1, n+1):
  5. fact=fact*i
  6. print(fact)

Output! is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube