Chapter 1: Problem 1
In Python you can compute the factorial of a positive integer \(n\) by the builtin function factorial( \(n\) ) from the subpackage special in SciPy (scipy.special.factorial(n)). Write your own version of this function, called factorial2, using a for loop. Use the time.time() function to compare the execution time of your version and the built-in version of the factorial function.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.