To prevent undue political influence, US Supreme Court justi…

To prevent undue political influence, US Supreme Court justices serve until they either 1) choose to retire, or 2) reach the end of their natural life. The justices.csv file contains information about each US Supreme Court justice appointed in the history of the country. To review, the columns of the file contain: Justice first name Justice last name State the justice is from Name of the president who appointed the justice Year appointed Year the appointment ended The 6th column contains 0 for justices currently serving at the time the data file was compiled. Write a function named three_longest_appts that accepts three arguments: a file name, a beginning year, and an ending year. Return a 2-dimensional array containing the first and last name of the three longest-serving justices appointed between the beginning year and ending year (inclusive). Include in your analysis only those justices whose term has ended (retired or passed away). For full credit, your function should use NumPy concepts and techniques to calculate and return the result without using loops or list comprehensions. In : three_longest_appts(‘justices.csv’, 1789, 2022) Out: array(, , ]) In : three_longest_appts(‘justices.csv’, 1789, 1905) Out: array(, , ]) In : three_longest_appts(‘justices.csv’, 1906, 2025) Out: array(, , ]) In : three_longest_appts(‘justices.csv’, 1964, 2025) Out: array(, , ])

The exam is 120 minutes. You will have an additional 15 minu…

The exam is 120 minutes. You will have an additional 15 minutes to print (if available), scan and upload. If you submit after the allotted time, your exam will be considered late and may incur a late penalty. After you complete your exam, scan your solutions into one .pdf file. Please upload your completed exam file by clicking on the “Add File” button underneath Question 1’s blank answer field. Download exam file here: CE 529 Midterm Exam Closed Book + 1 Sheet 8.5″x11″ (2 pages) of Formulae + Calculator. Students must return question sheets with their answer sheets at the end of the exam. Students should only use heavy pencils or dark blue or black pens. Students should not write on the back of any page. If your exam utilizes Gradescope’s Student App, do NOT upload to Gradescope. You will only upload your scanned exam file to this D2L quiz.