Question
Sometimes a manager needs to look at historic data to make decisions about the future. A property manager needs to be able to look at
Sometimes a manager needs to look at historic data to make decisions about the future. A property manager needs to be able to look at both aggregate and specific data about their properties and make some decisions. The properties have unique names based on their environment (e.g., lake, meadow, beach, mountain, country, etc.). The aspects of each property that are tracked include actions like repairs (major work on the house), fixes (minor upkeep), upgrades (major improvements), and others.
Write a program that processes property data to provide information about: A specific property and a specific action Aggregate information about an action across all properties (e.g., the total number of repairs across all properties or the total upgrades across all properties 3. Your program must do two things as specified above: a. Aggregate information about an action across all properties (e.g., the total number of repairs across all properties or the total upgrades across all properties) i. This part will ask the user what action they wish to get aggregate information about. ii. After receiving the input action, the program will then look through the dictionary and return a total of how many times that action has been done across all properties. iii. You must use a function to process the dictionary to get the counts (hint: youll need to pass the action that you are looking for as well as the dictionary to accomplish this) iv. The output should look similar to the following: upgrades ----> 54 b. Provide specific property and the number of times a specific action has been done at that property i. This part will ask the user for a property and which action for that property that they wish to get a count for (i.e., how many times that action was performed at that property) ii. After receiving the property and the action, you program will then get then use the dictionary to see how many times that action was done at that specific property. iii. The output should look similar to the following: lake property had 3 fixes iv. If a user is looking up repairs and a specific property has more than 5 repairs, you should print a warning for the user under the output in 3biii that is similar to Warning: You should probably sell this property.
4. Note that the program should run correctly regardless of which property or action is selected by the grader. The program should be effective in how it runs. For example, assume we were getting a total of four numbers from a list. It could be accomplished as A + B + C + D; however, having a loop to go through the list to do the adding would be more effective because the program could have millions of numbers and A + B + C + D would not be feasible.
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