We want to get a program that presents a menu, allows us to change some settings, and can print a randomly list of parties. The main menu should look something like this: (S)et number of parties (currently 0) (G)enerate parties (P)rint list of parties (Q)uit If the user presses an s (or S), it should ask for the number of parties. If the user presses a g (or G), it should generate a list of randomly generated parties. If the user presses a p (or P), it should print the list of parties. If the user presses a q (or Q), it should exit the program. 1a. Write a function that creates a loop with a set of menu options. Whatever the user presses, it should print the menu again. 1b. Implement the quit functionality: if the user presses q or Q, it should exit the menu loop (and thus the program). 1c. Implement the set number of parties functionality, using a separate function to gather the user input. Ensure that the menu correctly states the number. 1d. Implement the generate parties functionality. Write a separate function for this. 1e. Implement the printing of the list of parties. Write a separate function for this. 2. Add a menu item and functionality to ask for the number of voters. Once asked, it should in the background immediately create a list of voters with random locations (see 3a in Lab 4). The remaining exercise is hard, so don't worry if you cannot make this work yet! 3a. Add a menu item and functionality to calculate the number of voters per party, based on the assumption that each voter votes for the nearest party. It should print the list of parties with vote counts. 3b. Play around by (re)setting the voters and the parties and recalculating the number of votes for each party.