MarketingCosts


Data science 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 the new marketing campaign in order to sell the desired number of units.

The data from previous marketing campaigns can be used to evaluate how the number of units sold lineraly depends on the amount of money invested.

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

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

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