About 50 results
Open links in new tab
  1. Function for factorial in Python - Stack Overflow

    Feb 27, 2011 · How do I go about computing a factorial of an integer in Python?

  2. Python lambda function to calculate factorial of a number

    Mar 14, 2013 · I have just started learning python. I came across lambda functions. On one of the problems, the author asked to write a one liner lambda function for factorial of a number. This is the …

  3. python - recursive factorial function - Stack Overflow

    How can I combine these two functions into one recursive function to have this result: factorial(6) 1! = 1 2! = 2 3! = 6 4! = 24 5! = 120 6! = 720 This is the current code for my factorial functi...

  4. python - Calculate the factorial of a number - Stack Overflow

    Jul 19, 2023 · Inside the function, write code to calculate the factorial of the given number. The factorial of a number is the product of all positive integers less than or equal to that number.

  5. Writing a Factorial function in one line in Python

    Aug 10, 2018 · Writing a Factorial function in one line in Python Asked 7 years, 5 months ago Modified 2 years, 10 months ago Viewed 7k times

  6. Factorial function in Python - Stack Overflow

    Oct 21, 2013 · Are you new to programming or new to Python? You should use the factorial function from the math module.

  7. python - How to make a program which adds up factorials without …

    May 17, 2021 · How to make a program which adds up factorials without using math.factorial? Asked 4 years, 7 months ago Modified 4 years, 7 months ago Viewed 2k times

  8. find the best way for factorial in python? - Stack Overflow

    Dec 16, 2013 · 0.540276050568 120 0.654400110245 120 From above code I have observed, While take less time than for My question is, Is the best way to find the factorial in python ?

  9. Factorial of a large number in python - Stack Overflow

    May 2, 2013 · 12 Factorials get very large, so it is often better to deal with logarithms of the number. Many languages have an lgamma library function which computes the natural logarithm of the …

  10. python - Factorial in numpy and scipy - Stack Overflow

    Feb 13, 2014 · How can I import factorial function from numpy and scipy separately in order to see which one is faster? I already imported factorial from python itself by import math. But, it does not …