Question: Define a function called factorial(n) that uses a for loop to calculate the factorial of the input number n. You may safely assume that
Define a function called factorial(n) that uses a for loop to calculate the factorial of the input number n. You may safely assume that n is an integer 1 or more. The function should return the value of n! You may not use the math.factorial function. NOTE: when you hit submit, Edfinity may tell you that you have not yet answered this question - it will still grade it properly though. Previous 1 def factorial(n): Check syntax
Step by Step Solution
3.40 Rating (156 Votes )
There are 3 Steps involved in it
Sure heres a Python function called factorial that calculates the factorial of ... View full answer
Get step-by-step solutions from verified subject matter experts
