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

    Feb 27, 2011 · Starting with Python 3.9, passing a float to this function will raise a DeprecationWarning. If you want to do that, you need to convert n to an int explicitly: …

  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. Is there a math nCr function in Python? - Stack Overflow

    The denominator can be computed using factorial, which is comparable in Python 2 (slightly slower as r increases?) and much faster in Python 3.

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

    Jul 19, 2023 · Define a function called calculate_factorial that takes in one parameter, number. Inside the function, write code to calculate the factorial of the given number. The factorial of a …

  6. 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.

  7. 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 < ...

  8. 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 …

  9. Python Binomial Coefficient - Stack Overflow

    Oct 25, 2014 · You're in luck that python has unlimited length integers, because in every other language computing two enormous factorials and then dividing to give a fairly modest result …

  10. Factorial calculation using Python - Stack Overflow

    Feb 13, 2014 · I am new to Python and currently reading Python 3 for absolute beginner and face following problem. I would like to calculate factorial with procedure. request user to input an …