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)

Please click on the like button if it worked

Solution not working or have any suggestions? Please send an email to [email protected]

Join Our Facebook Group

Share this example

Download Android App 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