About 2,750,000 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 …

  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. Factorial of a large number in python - Stack Overflow

    May 2, 2013 · If you can, you should point to a link to "log factorial approximations", since they are the most relevant in your answer to the question of calculating the factorial of a large number.

  5. Fast algorithms for computing the factorial - Stack Overflow

    Apr 15, 2013 · Can anybody point me to more detailed descriptions of these (or other fast) algorithms for computing large exact factorials fast? Factorials with prime factorization …

  6. Write factorial with while loop python - Stack Overflow

    I am new and do not know a lot about Python. Does anybody know how you can write a factorial in a while loop? I can make it in an if / elif else statement: num = ... factorial = 1 if num < ...

  7. factorial with for loop in python - Stack Overflow

    factorial with for loop in python Asked 8 years, 2 months ago Modified 3 years, 11 months ago Viewed 8k times

  8. algorithm - Python - Sum of the factorials - Stack Overflow

    Python - Sum of the factorials Asked 10 years, 10 months ago Modified 7 years, 1 month ago Viewed 24k times

  9. What is memoization and how can I use it in Python?

    Jan 1, 2010 · I just started Python and I've got no idea what memoization is and how to use it. Also, may I have a simplified example?

  10. Writing a Factorial function in one line in Python

    Aug 10, 2018 · Here is my one-liner solution without importing anything. def factorial(n: int): return n * factorial(n - 1) if n > 1 else 1 It recurses until the input number is 1, where it finally returns …