MarketingCosts


Data analysis Linear regression Python Public New

Easy  

20min

Implement the desired_marketing_expenditure function, which returns the required amount of money that needs to be invested in a new marketing campaign to sell the desired number of units.

Use the data from previous marketing campaigns to evaluate how the number of units sold grows linearly as the amount of money invested increases.

For example, for the desired number of 60,000 units sold and previous campaign data from the table below, the function should return the float 250,000.

Previous campaigns
CampaignMarketing expenditureUnits sold
#1300,00060,000
#2200,00050,000
#3400,00090,000
#4300,00080,000
#5100,00030,000
Python 3.5.1
   

  •   Example case: Wrong answer
  •   Linear dependency without error: Wrong answer
  •   Linear dependency with error: Wrong answer