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

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

  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 · 6 I am looking to improve my coding by performing the same code in different ways, this not only is to help me become better at coding but also understand different people's code and their …

  6. python - How to get factorial with a for loop? - Stack Overflow

    Oct 3, 2020 · I'm new to Python. I only get by by self-studying please be kind. So I would like to ask, without using math factorial(), is how to answer this example: def factorial(n): result = 1 for i i...

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

  8. How to find out factorial number through user input in python?

    Oct 29, 2018 · I need to find out the factorial number through user input, i have tried this way but answer show nothing here is my code: Image show the Factorial code where i am facing the problem

  9. Python: Using def in a factorial program - Stack Overflow

    Python: Using def in a factorial program Asked 11 years, 3 months ago Modified 8 years, 1 month ago Viewed 4k times

  10. Using Reduce Function in Python To Find Factorial

    Oct 2, 2014 · 0 Here is a perfect snippet for the factorial function using a reduce built-in function. This will print 1 when n=0, as the factorial of 0 is 1.