Python算法代写 | Write a Technical Report of an Algorithm

本次美国作业案例是人工智能编程相关的一个AI代写assignment

 

Problem 1: Comma Separated Factorials

Write a Python function to return a string of rst k factorials (starting from 1!), separated by commas, in reverse order. Use a single for loop to achieve this. You may use a helper function.
For example, for k = 8, the output would be the following string: “40320,5040,720,120,24,6,2,1”

Problem 2: List Manipulation

Write a single Python function that takes two lists (x and y) as inputs for each of the following:

a. Return the resulting list after the following operations: (i) sort y by descending order, and (ii) delete the last element of this sorted list.

b. Return the reverse list of x.

c. Return the list of unique elements that you get by concatenating x and y, in ascending order.

d. Return a single list consisting of x and y as its two elements.

Problem 3: Set Manipulation

Write a single Python function that takes three sets, x, y, and z, as inputs for each of the following:

a. Return the union set of all three sets.
b. Return the intersection set of all three sets.
c. Return a set of elements that belong to only a single set out of the three sets.