Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please write PYTHON CODE to make a program A property manager needs to be able to look at both aggregate and specific data about their
Please write PYTHON CODE to make a program
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.
- The program must have a single dictionary to contain the data about the properties and the activities (nested dictionary)
- dictionary must be loaded with at least four properties (at a minimum you must include lake, meadow, beach, and country). Each property must have at least two different activities associated with it and at least one property must have three actions (at a minimum you must have repairs and fixes). Each action will have the number of times that action was completed in the last year on that property.
-
- 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.
- 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)
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