Chopped factorial
Write a function (in Python) called chop that takes as input alist of size n >2, and returns a new list without the originalfirst and last elements. For example, if the input is: [1,2,3,4,5]Your function should return [2,3,4] Then, based on the new listprint the following lines, adjusting the numbers accordingly: Thereare 3 elements in the following chopped list: [2, 3, 4]. The sum ofits elements is 9 and the factorial of the sum is 362880.
HINT: There is a factorial function in the math module. Note: InPython, lists are passed by reference, so for your function chop towork properly
PayPal Gateway not configured
PayPal Gateway not configured