Question: Please code in python 6. Bonus Question: (20 points) Write a recursive function for calculating n factorial: n! Mathematically,n! = nx(n-1) x (n-2) x (n-3)

Please code in python
6. Bonus Question: (20 points) Write a recursive function for calculating n factorial: n! Mathematically,n! = nx(n-1) x (n-2) x (n-3) X. ....... X 3 x 2 x 1 From user input, get an integer number, print out the factorial result for this number Hint: 1) Decompose the original problem into simpler instance of the same problem and get the recursive function, which is n! = n x(n-1)! 2) Find the base/special case to terminate the recursion: 1! = 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
