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
Campaign | Marketing expenditure | Units sold |
---|---|---|
#1 | 300,000 | 60,000 |
#2 | 200,000 | 50,000 |
#3 | 400,000 | 90,000 |
#4 | 300,000 | 80,000 |
#5 | 100,000 | 30,000 |
- Example case: Wrong answer
- Linear dependency without error: Wrong answer
- Linear dependency with error: Wrong answer
Tags
Python Data ScienceScore Distribution
0-33% | |
---|---|
34-66% | |
67-100% |
Would you like to see our other questions?
We have 850+ premium hand-crafted questions for 50+ job skills and 15+ coding languages. We prefer questions with small samples of actual work over academic problems or brain teasers.
Visit our question libraryPrivate Concierge
Send us an email with an explanation of your testing needs and a list of candidates. We will create an appropriate test, invite your candidates, review their results, and send you a detailed report.
Contact Private ConciergeWould you like to see our tests? The following tests contain Python Data Science related questions:
On the TestDome Blog
Screening Applicants: The Good, the Bad and the Ugly
Since we’re all biased and we use incorrect proxies, why not just outsource hiring to experts or recruitment agencies? After all, they’ve been screening people for many years, so they must know how to do it right?
Not really. I was surprised to discover that many experts disagree with each other. Everybody praises their pet method and criticizes the others. Many of these methods look legitimate, but are based on...