Question
PYTHON 1. Create a class named State that will store information about a US state and provide methods to get, and set the data, and
PYTHON 1. Create a class named State that will store information about a US state and provide methods to get, and set the data, and compare the states. a. Data attributes: State Name, Capitol, Region, US House Seats, Population, COVID Deaths, Full Vaccination Rates, Median Household Income, and Violent Crime Rate. b. Initializer (__init__) c. Getter and setter methods for each field d. __gt__ method so that two State objects can be compared based on state names e. __str__ method so that a state object can be printed like a string 2. Create a program that will: a. Prompt user to enter the name of the CSV file, e.g., States.csv, as input to the system. b. Parse States.csv and create a list of State objects containing the data in the file. (Note: do not change States.csv file at all.) c. Repetitively print to the user a menu of the following options: 1) Print a State Report 2) Sort by State Name 3) Sort by Region 4) Sort by COVID Death Rate 5) Sort by Median Household Income 6) Sort by Violent Crime Rate 7) Sort by Full Vaccination Rate 8) Find and print state for a given State Name 9) Print Spearmans r Correlation Matrix
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started