For the following exercises, please note: * You should write a number of tests for each function you write. Ideally, write the tests before you write the function. * Only use while-loops (or recursion), not for-loops. * Where you can use functions you wrote in earlier exercises, you should always do so. 1. Write a function that takes a list as input and returns a list in reverse order, using a while loop. 2a. Take the infectious disease simulation from the previous homework and write a function that runs the simulation R times, returning a list with all the results. 2b. Use the library matplotlib to produce a histogram of the simulation results, explained at https://www.w3schools.com/python/matplotlib_histograms.asp 3a. Write a function that takes a parameter N and returns a list of N voters at random (x,y) coordinates. The list of voters should be a list of lists, with each voter having an x and y coordinate, respectively. The random positions should be based on uniform distributions between 0 and 1. 3b. Write a function that loops over a list of parties and returns the nearest party, using the distance function from earlier exercises. The list of parties should be a list of dictionaries, with each party described as: {"name": "...", "x": ..., "y": ...} 3c. Write a function that loops over a list of voters and returns a list of party names, with for each voter the nearest party, using the previous function.