Question: Solve with PyCharm(third-to-last digit is 4) Write a program that reads in the data from the CSV file previously used in Modules 6 and 7:


Write a program that reads in the data from the CSV file previously used in Modules 6 and 7: Your solution must work as indicated in the example output below (any inputs provided by the user are shown in bold): Welcone to my query program. What would you 14 ke to do? 1) Count how many people in a city. 2) Find the tallest person/people in a city. (b) Quit Option: 1 What city? Grand Portage There are 8 people in Girand Portage. What would you like to do? 1) Count how many people in a city. 2) Find the tallest person/people in a city. 0) Quit Option: 2 What city? Grand_Portage The tallest person in Grand Portage is Shelley Conpton What would you like to do? 1) Count how many people in a city. 2) Find the tallest person/people in a city, a) Quit Option: 2 What city? Ely The tallest people in Ely are: Cleo Moran Lester. Watkins What would you like to do? 1) Count hos many people in a city. 2) Find the tallest person/people in a city. 0) Quit Option: 1 What city? Geneva There are no people fron Geneva. What would you 11ke to do? 1) Count hou many people in a city. 2) Find the tallest person/people in a city. 8) Quit Option: Goodbye! The output generated by the second option depends on the third-to-the-last digit of your ID \#. If that digit is: 0,1,2, or 3 : Find the shortest person/people in the given city. 4,5, or 6 : Find the person in the city whose height is closest to the average height of all people in the given city. 7, 8, or 9: Find the tallest person/people in the given city. So, the example output above is similar to what is expected if your ID\#'s third-to-the-last digit is 7, 8, or 9. For finding the shortest and tallest person/people, your program should behave as indicated in the example above: If a single person is found, output generated is on one line; If multiple people are found, output generated occurs on multiple lines. For finding the person whose height is closest to the average height of all people in a given city, output generated should consist of only a single person, even if there are multiple people that are the same distance from the average height. It does not matter which person you output (i.e. the first, last, or any in between). Note: For full credit, your solution must work correctly even if it was processing a different data file with different city names and person names. In the case where there is no city with the name input by the user, your program should report: Ihere ary no people froe ecitykatep. Write a program that reads in the data from the CSV file previously used in Modules 6 and 7: Your solution must work as indicated in the example output below (any inputs provided by the user are shown in bold): Welcone to my query program. What would you 14 ke to do? 1) Count how many people in a city. 2) Find the tallest person/people in a city. (b) Quit Option: 1 What city? Grand Portage There are 8 people in Girand Portage. What would you like to do? 1) Count how many people in a city. 2) Find the tallest person/people in a city. 0) Quit Option: 2 What city? Grand_Portage The tallest person in Grand Portage is Shelley Conpton What would you like to do? 1) Count how many people in a city. 2) Find the tallest person/people in a city, a) Quit Option: 2 What city? Ely The tallest people in Ely are: Cleo Moran Lester. Watkins What would you like to do? 1) Count hos many people in a city. 2) Find the tallest person/people in a city. 0) Quit Option: 1 What city? Geneva There are no people fron Geneva. What would you 11ke to do? 1) Count hou many people in a city. 2) Find the tallest person/people in a city. 8) Quit Option: Goodbye! The output generated by the second option depends on the third-to-the-last digit of your ID \#. If that digit is: 0,1,2, or 3 : Find the shortest person/people in the given city. 4,5, or 6 : Find the person in the city whose height is closest to the average height of all people in the given city. 7, 8, or 9: Find the tallest person/people in the given city. So, the example output above is similar to what is expected if your ID\#'s third-to-the-last digit is 7, 8, or 9. For finding the shortest and tallest person/people, your program should behave as indicated in the example above: If a single person is found, output generated is on one line; If multiple people are found, output generated occurs on multiple lines. For finding the person whose height is closest to the average height of all people in a given city, output generated should consist of only a single person, even if there are multiple people that are the same distance from the average height. It does not matter which person you output (i.e. the first, last, or any in between). Note: For full credit, your solution must work correctly even if it was processing a different data file with different city names and person names. In the case where there is no city with the name input by the user, your program should report: Ihere ary no people froe ecitykatep
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
