Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- n_users = 50000
- revenue_per_user = 10
- var_costs = pd.Series({
- 'marketing': 200000,
- 'servers': 200000
- })
- fixed_costs = pd.Series({
- 'salaries': 300000,
- 'rent': 150000
- })
- revenue = n_users * revenue_per_user
- total_costs = var_costs.sum() + fixed_costs.sum()
- one_unit_var_costs = var_costs / n_users
- def unit_economics(marketing):
- items_sold = marketing / one_unit_var_costs
- revenue = items_sold * revenue_per_user
- var_costs = one_unit_var_costs * items_sold
- return revenue - sum(var_costs) - sum(fixed_costs)
- for m in range(300000, 1500000, 100000):
- print('Прибыль/убыток: {} при бюджете в {}'.format(unit_economics(m), m))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement