代写python编程 Design a solution and implement the solution in Python to solve the problem described below.