Cross-Price Elasticity Calculator
def calculate_cross_price_elasticity(percent_change_quantity_a, percent_change_price_b): if percent_change_price_b == 0: return None # Avoid division by zero cross_price_elasticity = percent_change_quantity_a / percent_change_price_b return round(cross_price_elasticity, 4) # Example usage pct_change_qty_a = float(input(“Enter % change in quantity demanded of good A: “)) pct_change_price_b = float(input(“Enter % change in price of good B: “)) elasticity = calculate_cross_price_elasticity(pct_change_qty_a, pct_change_price_b) if elasticity is…