("apartment""rental")apartmentrental("apartment""purchase")apartmentpurchase that' some pretty funny looking code this is dictionarywhere the keys are tuples of two distinct stringsand the values are class objects class objectsyesclasses can be passed aroundrenamedand stored in containers just like normal objects or primitive data types with this simple dictionarywe can simply hijack our earlier get_valid_input method to ensure we get the correct dictionary keys and look up the appropriate classlike thisdef add_property(self)property_type get_valid_input"what type of property"("house""apartment")lower(payment_type get_valid_input"what payment type"("purchase""rental")lower(propertyclass self type_map(property_typepayment_type)init_args propertyclass prompt_init(self property_list append(propertyclass(**init_args)this may look bit funny toowe look up the class in the dictionary and store it in variable named propertyclass we don' know exactly which class is availablebut the class knows itselfso we can polymorphically call prompt_init to get dictionary of values appropriate to pass into the constructor then we use the keyword argument syntax to convert the dictionary into arguments and construct the new object to load the correct data now our user can use this agent class to add and view lists of properties it wouldn' take much work to add features to mark property as available or unavailable or to edit and remove properties our prototype is now in good enough state to take to real estate agent and demonstrate its functionality here' how demo session might workagent agent(agent add_property(what type of propertywhat payment type(houseapartmenthouse (purchaserentalrental enter the square feet enter number of bedrooms enter number of bathsone and half